<?php
/* 
*Author Nexify group FIT
*
*used date as Timestamp in mysql
*/
// have to solve timestamp problem in hospital collection
//drop table if exist didn't do
//lock table didn't do 




// connect
$m = new MongoClient();

// select a database
$db = $m->vesuvius;

//--------------------------------adodb_logsql collection----------------------------------------------
$collection = $db->adodb_logsql;
$document = array(
		"created" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"sql0" => "" ,
		"sql1" => "",
		"params" => "",
		"tracer" => "",
		"timer" => 0.0
);
$collection->insert($document); //checked
/*
 *
*/
//--------------------------------alt_logins collection----------------------------------------------

$collection = $db->alt_logins;
$document = array(
		"p_uuid" => "",
		"user_name" => "" ,
		"type" => ""
);
$collection->insert($document); //checked
/*
 *  PRIMARY KEY  (`p_uuid`)
 */
//--------------------------------arrival_rate collection----------------------------------------------

$collection = $db->arrival_rate;
$document = array(
		"person_uuid" => "",
		"incident_id" => new MongoInt64("0") ,
		"arrival_time" => new MongoDate(strtotime("2010-01-15 00:00:00")) ,
		"source_all" => 0 ,
		"source_triagepic" => 0 ,
		"source_reunite" => 0 ,
		"source_website" => 0 ,
		"source_pfif" => 0 ,
		"source_vanilla_email" => 0
);
$collection->insert($document); //checked
/*
 * PRIMARY KEY  (`person_uuid`),
 * KEY `incident_index` (`incident_id`),
  CONSTRAINT `arrival_rate_ibfk_1` FOREIGN KEY (`person_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `arrival_rate_ibfk_2` FOREIGN KEY (`incident_id`) REFERENCES `incident` (`incident_id`) ON DELETE CASCADE ON UPDATE CASCADE
 * 
 */
//--------------------------------audit collection----------------------------------------------

$collection = $db->audit;
$document = array(
		"audit_id" => new MongoInt64("0"),
		"updated" => new MongoDate(strtotime("2010-01-15 00:00:00")) ,
		"x_uuid" => "" ,
		"u_uuid" => "" ,
		"change_type" => "" ,
		"change_table" => "" ,
		"change_field" => "" ,
		"prev_val" => "" ,
		"new_val" => ""
);
$collection->insert($document); //checked

/*
 *  PRIMARY KEY  (`audit_id`)
 */
//--------------------------------config collection----------------------------------------------
$collection = $db->config;
$document = array(
		"config_id" => new MongoInt64("0"),
		"module_id" => "" ,
		"confkey" => "" ,
		"value" => ""
);
$collection->insert($document); //checked
/*
 *  PRIMARY KEY  (`config_id`),
  KEY `module_id` (`module_id`)
 */
//--------------------------------contact collection----------------------------------------------
$collection = $db->contact;
$document = array(
		"p_uuid" => "",
		"opt_contact_type" => "" ,
		"contact_value" => ""
);
$collection->insert($document); //checked

/*
 *   PRIMARY KEY  (`p_uuid`,`opt_contact_type`),
  KEY `contact_value` (`contact_value`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `contact_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
 */
//--------------------------------dao_error_log collection----------------------------------------------

$collection = $db->dao_error_log;
$document = array(
		"time" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"file" => "" ,
		"line" => "" ,
		"method" => "" ,
		"class" => "" ,
		"function" => "" ,
		"error_message" => "" ,
		"other" => ""
);
$collection->insert($document);//checked
/*
 *
*/
//--------------------------------edxl_co_header collection----------------------------------------------

$collection = $db->edxl_co_header;
$document = array(
		"de_id" => 0,
		"co_id" => 0 ,
		"p_uuid" => "" ,
		"type" => "" , // enum 'lpf' , 'tep' , 'pix'
		"content_descr" => "" ,
		"incident_id" => "" ,
		"incident_descr" => "" ,
		"confidentiality" => ""
);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`co_id`),
  KEY `de_id` (`de_id`),
  KEY `p_uuid_idx` (`p_uuid`),
  CONSTRAINT `edxl_co_header_ibfk_1` FOREIGN KEY (`de_id`) REFERENCES `edxl_de_header` (`de_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `edxl_co_header_ibfk_2` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
 */

//--------------------------------edxl_co_header_seq collection----------------------------------------------

$collection = $db->edxl_co_header_seq;
$document = array(
		"id" => new MongoInt64(1)
);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`id`)
 */

//--------------------------------edxl_co_keywords collection----------------------------------------------


$collection = $db->edxl_co_keywords;
$document = array(
		"co_id" => 0,
		"keyword_num" => 0 ,
		"keyword_urn" => "" ,
		"keyword" => ""
);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`co_id`,`keyword_num`),
  CONSTRAINT `edxl_co_keywords_ibfk_1` FOREIGN KEY (`co_id`) REFERENCES `edxl_co_header` (`co_id`) ON DELETE CASCADE ON UPDATE CASCADE
 */

//--------------------------------edxl_co_lpf collection----------------------------------------------


$collection = $db->edxl_co_lpf;
$document = array(
		"co_id" => 0,
		"p_uuid" => "" ,
		"schema_version" => "" ,
		"login_machine" => "" ,
		"login_account" => "" ,
		"person_id" => "" ,
		"event_name" => "" ,
		"event_long_name" => "" ,
		"org_name" => "" ,
		"org_id" => "" ,
		"last_name" => "" ,
		"first_name" => "" ,
		"gender" => "" ,//enum 'M' , 'F' , 'U' , 'C'
		"peds" => 0 ,
		"triage_category" => ""// enum 'Green' , 'BH Green' , 'Yellow', 'Red' , 'Gray'
);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`co_id`,`p_uuid`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `edxl_co_lpf_ibfk_1` FOREIGN KEY (`co_id`) REFERENCES `edxl_co_header` (`co_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `edxl_co_lpf_ibfk_2` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
 */

//--------------------------------edxl_co_photos collection----------------------------------------------

$collection = $db->edxl_co_photos;

$document = array(
		"co_id" => 0,
		"p_uuid" => "" ,
		"mimeType" => "" ,
		"uri" => "" ,
		"contentData" => "" ,
		"image_id" => 0 ,
		"sha1" => ""
);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`co_id`,`p_uuid`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `edxl_co_photos_ibfk_1` FOREIGN KEY (`co_id`) REFERENCES `edxl_co_header` (`co_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `edxl_co_photos_ibfk_2` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
 */
//--------------------------------edxl_co_roles collection----------------------------------------------

$collection = $db->edxl_co_roles;

$document = array(
		"co_id" => 0,
		"role_num" => 0,
		"of_originator" => 0 ,
		"role_urn" => "" ,
		"role" => ""
);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`co_id`,`role_num`),
  KEY `role_num` (`role_num`),
  CONSTRAINT `edxl_co_roles_ibfk_1` FOREIGN KEY (`co_id`) REFERENCES `edxl_co_header` (`co_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `edxl_co_roles_ibfk_2` FOREIGN KEY (`role_num`) REFERENCES `edxl_de_roles` (`role_num`) ON DELETE CASCADE ON UPDATE CASCADE
 */
//--------------------------------edxl_d_header collection----------------------------------------------

$collection = $db->edxl_de_header;

$document = array(
		"de_id" => 0,
		"when_sent" => new MongoDate(strtotime("2010-01-15 00:00:00"))  ,
		"sender_id" => "" ,
		"distr_id" => "" ,
		"distr_status" => "" ,//enum 'Actual' , 'Exercise' , 'System' , 'Test'
		"distr_type" => "" , // enum 'Ack' , 'Cancel' , 'Dispatch' , 'Error' , 'Report'
		"combined_conf" => "" ,
		"language" => "" ,
		"when_here" => new MongoDate(strtotime("2010-01-15 00:00:00"))  ,
		"inbound" => 0
);
$collection->insert($document);
/*
 * PRIMARY KEY  (`de_id`)
 */
//--------------------------------edxl_de_header_seq collection----------------------------------------------------------------


$collection = $db->edxl_de_header_seq;
$document = array(
		"id" => new MongoInt64(1)

);
$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`id`)
 */
//--------------------------------edxl_de_keywords collection----------------------------------------------

$collection = $db->edxl_de_keywords ;
$document = array(
		"de_id" => 0,
		"keyword_num" => 0,
		"keyword_urn" => "",
		"keyword" => ""

);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`de_id`,`keyword_num`),
  CONSTRAINT `edxl_de_keywords_ibfk_1` FOREIGN KEY (`de_id`) REFERENCES `edxl_de_header` (`de_id`) ON DELETE CASCADE ON UPDATE CASCADE
 */
//--------------------------------edxl_de_prior_messages collection----------------------------------------------

$collection = $db->edxl_de_prior_messages ;
$document = array(
		"de_id" => 0,
		"prior_msg_num" => 0,
		"when_sent" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"sender_id" => "",
		"distr_id" => "",
);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`de_id`,`prior_msg_num`),
  CONSTRAINT `edxl_de_prior_messages_ibfk_1` FOREIGN KEY (`de_id`) REFERENCES `edxl_de_header` (`de_id`) ON DELETE CASCADE ON UPDATE CASCADE
 */
//--------------------------------edxl_de_roles collection----------------------------------------------
$collection = $db-> edxl_de_roles;
$document = array(
		"de_id" => 0,
		"role_num" => 0,
		"of_sender" => 0,
		"role_urn" => "",
		"role" => ""

);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`de_id`,`role_num`),
KEY `role_idx` (`role_num`),
CONSTRAINT `edxl_de_roles_ibfk_1` FOREIGN KEY (`de_id`) REFERENCES `edxl_de_header` (`de_id`) ON DELETE CASCADE ON UPDATE CASCADE
*/

//--------------------------------edxl_de_target_addresses collection----------------------------------------------

$collection = $db-> edxl_de_target_addresses;
$document = array(
		"de_id" => 0,
		"address_num" => 0,
		"scheme" => "",
		"value" => ""


);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`de_id`,`address_num`),
  CONSTRAINT `edxl_de_target_addresses_ibfk_1` FOREIGN KEY (`de_id`) REFERENCES `edxl_de_header` (`de_id`) ON DELETE CASCADE ON UPDATE CASCADE
 */
//--------------------------------edxl_de_target_circles collection----------------------------------------------

$collection = $db-> edxl_de_target_circles;
$document = array(
		"de_id" => 0,
		"circle_num" => 0,
		"latitude" => 0.0,
		"longitude" => 0.0,
		"radius_km" => 0.0

);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`de_id`,`circle_num`),
  CONSTRAINT `edxl_de_target_circles_ibfk_1` FOREIGN KEY (`de_id`) REFERENCES `edxl_de_header` (`de_id`) ON DELETE CASCADE ON UPDATE CASCADE
 */
//--------------------------------edxl_de_target_codes collection----------------------------------------------

$collection = $db->edxl_de_target_codes ;
$document = array(
		"de_id" => 0,
		"codes_num" => 0,
		"code_type" => "",//enum 'country','subdivision','locCodeUN'
		"code" => ""

);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`de_id`,`codes_num`),
  CONSTRAINT `edxl_de_target_codes_ibfk_1` FOREIGN KEY (`de_id`) REFERENCES `edxl_de_header` (`de_id`) ON DELETE CASCADE ON UPDATE CASCADE
 */
//--------------------------------edxl_de_target_polygons collection----------------------------------------------

$collection = $db->edxl_de_target_polygons ;
$document = array(
		"de_id" => 0,
		"poly_num" => 0,
		"point_num" => 0,
		"latitude" => 0.0,
		"longitude" => 0.0

);
$collection->insert($document);//checked

/*
 *  PRIMARY KEY  (`de_id`,`poly_num`,`point_num`),
  CONSTRAINT `edxl_de_target_polygons_ibfk_1` FOREIGN KEY (`de_id`) REFERENCES `edxl_de_header` (`de_id`) ON DELETE CASCADE ON UPDATE CASCADE
 */
//--------------------------------expiry_queue collection----------------------------------------------

$collection = $db->expiry_queue ;
$document = array(
		"index" => 0,
		"p_uuid" => "",
		"requested_by_user_id" => 0,
		"requested_when" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"requested_why" => "",
		"queued" => 0,
		"approved_by_user_id" => 0,
		"approved_when" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"approved_why" => "",
		"expired" => 0

);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`index`)
 */
//------------------------field_options collection--------------------------
$collection = $db->field_options ;

/*
 *  KEY `option_code` (`option_code`),
  KEY `option_description` (`option_description`)
 */

$document = array(
		"field_name" => "opt_status",
		"option_code" => "ali",
		"option_description" => "Alive & Well",
		"display_order" =>NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status",
		"option_code" => "mis",
		"option_description" => "Missing",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status",
		"option_code" => "inj",
		"option_description" => "Injured",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status",
		"option_code" => "dec",
		"option_description" => "Deceased",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_gender",
		"option_code" => "mal",
		"option_description" => "Male",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_gender",
		"option_code" => "fml",
		"option_description" => "Female",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "home",
		"option_description" => "Home(permanent address)",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "name",
		"option_description" => "Contact Person",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "pmob",
		"option_description" => "Personal Mobile",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "curr",
		"option_description" => "Current Phone",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "cmob",
		"option_description" => "Current Mobile",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "email",
		"option_description" => "Email address",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "fax",
		"option_description" => "Fax Number",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "web",
		"option_description" => "Website",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "inst",
		"option_description" => "Instant Messenger",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => "GRN",
		"option_description" => "Green",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => "GRY",
		"option_description" => "Gray",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_race",
		"option_code" => "R1",
		"option_description" => "American Indian or Alaska Native",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_race",
		"option_code" => NULL,
		"option_description" => "Unknown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => "BRO",
		"option_description" => "Brown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => "BLU",
		"option_description" => "Blue",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => "BLK",
		"option_description" => "Black",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "DRK",
		"option_description" => "Dark",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "BLK",
		"option_description" => "Black",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "ALB",
		"option_description" => "Albino",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "BLN",
		"option_description" => "Blond or Strawberry",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "BLK",
		"option_description" => "Black",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "BLD",
		"option_description" => "Bald",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_location_type",
		"option_code" => "2",
		"option_description" => "Town or Neighborhood",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_location_type",
		"option_code" => "1",
		"option_description" => "County or Equivalent",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_contact_type",
		"option_code" => "zip",
		"option_description" => "Zip Code",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => NULL,
		"option_description" => "Unknown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => "HAZ",
		"option_description" => "Hazel",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => "MAR",
		"option_description" => "Maroon",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => "MUL",
		"option_description" => "Multicolored",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_eye_color",
		"option_code" => "PNK",
		"option_description" => "Pink",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "DBR",
		"option_description" => "Dark Brown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "FAR",
		"option_description" => "Fair",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "LGT",
		"option_description" => "Light",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "LBR",
		"option_description" => "Light Brown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "MED",
		"option_description" => "Medium",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => NULL,
		"option_description" => "Unknown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "OLV",
		"option_description" => "Olive",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "RUD",
		"option_description" => "Ruddy",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "SAL",
		"option_description" => "Sallow",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "YEL",
		"option_description" => "Yellow",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "BLU",
		"option_description" => "Blue",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "BRO",
		"option_description" => "Brown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "GRY",
		"option_description" => "Gray",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "GRN",
		"option_description" => "Green",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "ONG",
		"option_description" => "Orange",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "PLE",
		"option_description" => "Purple",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "PNK",
		"option_description" => "Pink",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "RED",
		"option_description" => "Red or Auburn",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "SDY",
		"option_description" => "Sandy",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => "WHI",
		"option_description" => "White",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_race",
		"option_code" => "R2",
		"option_description" => "Asian",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_race",
		"option_code" => "R3",
		"option_description" => "Black or African American",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_race",
		"option_code" => "R4",
		"option_description" => "Native Hawaiian or Other Pacific Islander",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_race",
		"option_code" => "R5",
		"option_description" => "White",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_race",
		"option_code" => "R9",
		"option_description" => "Other Race",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "PEV",
		"option_description" => "Protestant, Evangelical",
		"display_order" => 1
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "PML",
		"option_description" => "Protestant, Mainline",
		"display_order" => 2
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "PHB",
		"option_description" => "Protestant, Historically Black",
		"display_order" => 3
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "CAT",
		"option_description" => "Catholic",
		"display_order" => 4
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "MOM",
		"option_description" => "Mormon",
		"display_order" => 5
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "JWN",
		"option_description" => "Jehovah\'s Witness",
		"display_order" => 6
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "ORT",
		"option_description" => "Orthodox",
		"display_order" => 7
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "COT",
		"option_description" => "Other Christian",
		"display_order" => 8
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "JEW",
		"option_description" => "Jewish",
		"display_order" => 9
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "BUD",
		"option_description" => "Buddhist",
		"display_order" => 10
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "HIN",
		"option_description" => "Hindu",
		"display_order" => 11
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "MOS",
		"option_description" => "Muslim",
		"display_order" => 12
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "OTH",
		"option_description" => "Other Faiths",
		"display_order" => 13
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => "NOE",
		"option_description" => "Unaffiliated",
		"display_order" => 14
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_religion",
		"option_code" => NULL,
		"option_description" => "Unknown",
		"display_order" => 15
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_hair_color",
		"option_code" => NULL,
		"option_description" => "Unknown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_skin_color",
		"option_code" => "MBR",
		"option_description" => "Medium Brown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_gender",
		"option_code" => NULL,
		"option_description" => "Unknown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_gender",
		"option_code" => "cpx",
		"option_description" => "Complex",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status",
		"option_code" => "unk",
		"option_description" => "Unknown",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status",
		"option_code" => "fnd",
		"option_description" => "Found",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status_color",
		"option_code" => "fnd",
		"option_description" => "#7E2217",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status_color",
		"option_code" => "ali",
		"option_description" => "#167D21",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status_color",
		"option_code" => "inj",
		"option_description" => "#FF0000",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status_color",
		"option_code" => "unk",
		"option_description" => "#808080",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status_color",
		"option_code" => "dec",
		"option_description" => "#000000",
		"display_order" => NULL
);

$collection->insert($document);

$document = array(
		"field_name" => "opt_status_color",
		"option_code" => "mis",
		"option_description" => "#0000FF",
		"display_order" => NULL
);

$collection->insert($document);
//checked

//------------------------end of field_options collection------------------------

//-------------------------hospital collection ----------------------------------
/*
 *PRIMARY KEY  (`hospital_uuid`)
*/

$collection = $db->hospital ;

$document = array(
		"hospital_uuid" => "1",
		"name" => "Suburban Hospital",
		"short_name" => "Suburban",
		"street1" => "8600 Old Georgetown Road",
		"street2" => "",
		"city" => "Bethesda",
		"county" => "Montgomery",
		"region" => "MD",
		"postal_code" => "20814-1497",
		"country" => "USA",
		"latitude" => 43.4420293,
		"longitude" => -71.300549,
		"phone" => "301-896-3118",
		"fax" => "",
		"email" => "info@suburbanhospital.org",
		"www" => "www.suburbanhospital.org",
		"npi" => "1205896446",
		"patient_id_prefix" => "911-",
		"patient_id_suffix_variable" => 0,
		"patient_id_suffix_fixed_length" => 5,
		"creation_time" => new MongoDate(strtotime("2010-01-01 06:01:01")),
		"icon_url" => "theme/lpf3/img/suburban.png",
		"legalese" => "[This document is a straw man example, based on a reworking of the HIPAA policy statement at www.hhs.gov/hipaafaq/providers/hipaa-1068.html.  It has not been reviewed by legal council, nor reviewed or approved by Suburban Hospital or any other BHEPP member.]\n\n[The following is an example statement for attachment to a full record generated by \"TriagePic\".  Partial records (e.g., de-identified) have different statements.]\n\nNotice of Privacy Practices and Information Distribution\n========================================================\nSuburban Hospital is covered by HIPAA, so the provided disaster victim information (the \"record\", which may include a photo) is governed by provisions of the HIPAA Privacy Rule.\n\nDuring a disaster, HIPPA permits disclosures for treatment purposes, and certain disclosures to disaster relief organizations (like the American Red Cross) so that family members can be notified of the patient\'s location.  (See CFR 164.510(b)(4).\n\nThe primary of purpose of the record is for family reunification.  Secondary usages may include in-hospital patient tracking, treatment/continuity-of-care on patient transfer, disaster situational awareness and resource management, and feedback to emergency medical service providers who provide pre-hospital treatment.  The record (in various forms) will be distributed within Suburban Hospital, and to and within the institutions with which Suburban Hospital partners through the Bethesda Hospital Emergency Preparedness Partnership.  These are the NIH Clinical Center, Walter Reed National Military Medical Hospital, and National Library of Medicine.  In particular, the record is sent to NLM\'s Lost Person Finder database for exposure through the web site, with appropriate filtering and verification.  HIPAA allows patients to be listed in the facility directory, and some aspects of Lost Person Finder are analogous to that.  For more, see the Notice of Privacy Practices associated with the LPF web site.  \n\nThe record was generated by a \"TriagePic\" application, operated by Suburban Hospital personnel.  The application includes the ability to express the following [TO DO]:\n\n- patient agrees to let hospital personnel speak with family members or friends involved in the patient\'s care (45 CFR 164.510(b));\n- patient wishes to opt out of the facility directory (45 CFR 164.510(a));  [THIS MIGHT BE INTERPRETED AS OPTING OUT OF LPF.  MORE TO UNDERSTAND.]\n- patient requests privacy restrictions (45 CFR 164.522(a))\n- patient requests confidential communications (45 CFR 164.522(b))\n\n[IMPLICATIONS OF THESE CHOICES ON RECORD GENERATION NOT YET KNOWN.]\n\nIn addition, there is a requirement to distribute a notice of privacy practices, addressed by this attachment and the LPF Notice of Privacy Practices.\n\nPenalties for non-compliance with the above five rules may be waived, for a limited time in a limited geographical area, if the President declares an emergency or disaster AND the Health and Human Services Secretary declares a public health emergency.  Within that declared timespan, a hospital may rely on the waiver (which covers all patients present) only from the moment of instituting its disaster protocol to at most 72 hours later.  For more, see www.hhs.gov/hipaafaq/providers/hipaa-1068.html.  The waiver is authorized under the Project Bioshield Act of 2004 (PL 108-276) and section 1135(b) of the Social Security Act.\n\nPhoto Copyright\n===============\nThe attached photo if any was taken by an employee or volunteer of Suburban Hospital and is copyright Suburban Hospital in the year given by the reporting date.  Reproduction and distribution is permitted to the extent governed by policy for the overall record.  Please credit Suburban Hospital and the employee(s)/volunteer(s) listed.",
		"legaleseAnon" => "[This document is a straw man example.  It has not been reviewed by legal council, nor reviewed or approved by Suburban Hospital or any other BHEPP member.]\n\n[The following is an example statement for attachment to an anonymized, de-identified record generated by \"TriagePic\".  Full records (e.g., patient-identified) may have different statements.]\n\nNotice of Privacy Practices and Information Distribution\n========================================================\nThe attached record was generated by a \"TriagePic\" application, operated by Suburban Hospital personnel at the point where disaster victims arrive at the hospital.  While the application does generate real-time patient-specific information (text and photo), the attached record has been anonymized/de-identified to remove patient identifiers (e.g., no photo), and is intended for public release.  It retains categorial information on gender and adult-vs.-child (\"Peds\"), as well as arrival time, and the hospital personnel involved.  It is intended to be useful for disaster situational awareness and rate-of-arrival purposes.\n\nNo system of de-identification that retains any useful information is perfect.  The recipient who uses this record in an effort to re-identify patients is responsible for any legal ramifications and potential violations of HIPAA or other laws pertaining to patient confidentiality.",
		"legaleseTimestamp" => new MongoDate(strtotime("2011-10-04 16:50:51")) ,
		"legaleseAnonTimestamp" => new MongoDate(strtotime("2011-10-04 16:50:51")),
		"photo_required" => 1,
		"honor_no_photo_request" => 1,
		"photographer_name_required" => 0,
);

$collection->insert($document);


$document = array(
		"hospital_uuid" => 2,
		"name" => "Walter Reed National Military Medical Center",
		"short_name" => "WRNMMC",
		"street1" => "8901 Rockville Pike",
		"street2" => "",
		"city" => "Bethesda",
		"county" => "Montgomery",
		"region" => "MD",
		"postal_code" => "20889-0001",
		"country" => "USA",
		"latitude" => 39.00204,
		"longitude" => -77.0945,
		"phone" => "301-295-4611",
		"fax" => "",
		"email" => "",
		"www" => "www.bethesda.med.navy.mil",
		"npi" => "1356317069",
		"patient_id_prefix" => "",
		"patient_id_suffix_variable" => 1,
		"patient_id_suffix_fixed_length" => 0,
		"creation_time" => new MongoDate(strtotime("2010-09-22 22:49:34")),
		"icon_url" => "theme/lpf3/img/nnmc.png",
		"legalese" => "[This document is a straw man example, based on a reworking of the HIPAA policy statement at www.hhs.gov/hipaafaq/providers/hipaa-1068.html.  It has not been reviewed by legal council, nor reviewed or approved by Walter Reed National Naval Medical Center or any other BHEPP member.]\n\n[The following is an example statement for attachment to a full record generated by \"TriagePic\".  Partial records (e.g., de-identified) have different statements.]\n\nNotice of Privacy Practices and Information Distribution\n========================================================\nWalter Reed National Medical Medical Center is covered by HIPAA, so the provided disaster victim information (the \"record\", which may include a photo) is governed by provisions of the HIPAA Privacy Rule.\n\nDuring a disaster, HIPPA permits disclosures for treatment purposes, and certain disclosures to disaster relief organizations (like the American Red Cross) so that family members can be notified of the patient\'s location.  (See CFR 164.510(b)(4).\n\nThe primary of purpose of the record is for family reunification.  Secondary usages may include in-hospital patient tracking, treatment/continuity-of-care on patient transfer, disaster situational awareness and resource management, and feedback to emergency medical service providers who provide pre-hospital treatment.  The record (in various forms) will be distributed within Walter Reed National Medical Medical Center, and to and within the institutions with which National Naval Medical Center partners through the Bethesda Hospital Emergency Preparedness Partnership.  These are the NIH Clinical Center, Walter Reed National Medical Medical Hospital, and National Library of Medicine.  In particular, the record is sent to NLM\'s People Locator database for exposure through the web site, with appropriate filtering and verification.  HIPAA allows patients to be listed in the facility directory, and some aspects of People Locator are analogous to that.  For more, see the Notice of Privacy Practices associated with the PL web site.  \n\nThe record was generated by a \"TriagePic\" application, operated by Walter Reed National Military Medical Center personnel.  The application includes the ability to express the following [TO DO]:\n\n- patient agrees to let hospital personnel speak with family members or friends involved in the patient\'s care (45 CFR 164.510(b));\n- patient wishes to opt out of the facility directory (45 CFR 164.510(a));  [THIS MIGHT BE INTERPRETED AS OPTING OUT OF PL.  MORE TO UNDERSTAND.]\n- patient requests privacy restrictions (45 CFR 164.522(a))\n- patient requests confidential communications (45 CFR 164.522(b))\n\n[IMPLICATIONS OF THESE CHOICES ON RECORD GENERATION NOT YET KNOWN.]\n\nIn addition, there is a requirement to distribute a notice of privacy practices, addressed by this attachment and the PL Notice of Privacy Practices.\n\nPenalties for non-compliance with the above five rules may be waived, for a limited time in a limited geographical area, if the President declares an emergency or disaster AND the Health and Human Services Secretary declares a public health emergency.  Within that declared timespan, a hospital may rely on the waiver (which covers all patients present) only from the moment of instituting its disaster protocol to at most 72 hours later.  For more, see www.hhs.gov/hipaafaq/providers/hipaa-1068.html.  The waiver is authorized under the Project Bioshield Act of 2004 (PL 108-276) and section 1135(b) of the Social Security Act.\n\nPhoto Copyright\n===============\nThe attached photo if any was taken by an employee or volunteer of Walter Reed National Military Medical Center and is copyright Walter Reed National Military Medical Center in the year given by the reporting date.  Reproduction and distribution is permitted to the extent governed by policy for the overall record.  Please credit Walter Reed National Military Medical Center and the employee(s)/volunteer(s) listed.",
		"legaleseAnon" => "[This document is a straw man example.  It has not been reviewed by legal council, nor reviewed or approved by Walter Reed National Military Medical Center or any other BHEPP member.]\n\n[The following is an example statement for attachment to an anonymized, de-identified record generated by \"TriagePic\".  Full records (e.g., patient-identified) may have different statements.]\n\nNotice of Privacy Practices and Information Distribution\n========================================================\nThe attached record was generated by a \"TriagePic\" application, operated by Walter Reed National Military Medical Center personnel at the point where disaster victims arrive at the hospital.  While the application does generate real-time patient-specific information (text and photo), the attached record has been anonymized/de-identified to remove patient identifiers (e.g., no photo), and is intended for public release.  It retains categorial information on gender and adult-vs.-child (\"Peds\"), as well as arrival time, and the hospital personnel involved.  It is intended to be useful for disaster situational awareness and rate-of-arrival purposes.\n\nNo system of de-identification that retains any useful information is perfect.  The recipient who uses this record in an effort to re-identify patients is responsible for any legal ramifications and potential violations of HIPAA or other laws pertaining to patient confidentiality.",
		"legaleseTimestamp" => new MongoDate(strtotime("2011-10-04 16:52:15")),
		"legaleseAnonTimestamp" => new MongoDate(strtotime("2011-10-04 16:52:15")),
		"photo_required" => 1,
		"honor_no_photo_request" => 1,
		"photographer_name_required" => 0
);

$collection->insert($document);


$document = array(
		"hospital_uuid" => 3,
		"name" => "NLM (testing)",
		"short_name" => "NLM",
		"street1" => "9000 Rockville Pike",
		"street2" => "",
		"city" => "Bethesda",
		"county" => "Montgomery",
		"region" => "MD",
		"postal_code" => "20892",
		"country" => "USA",
		"latitude" => 38.995523,
		"longitude" => -77.096597,
		"phone" => "",
		"fax" => "",
		"email" => "",
		"www" => "www.nlm.nih.gov",
		"npi" => "1234567890",
		"patient_id_prefix" => "911-",
		"patient_id_suffix_variable" => 1,
		"patient_id_suffix_fixed_length" => -1,
		"creation_time" => new MongoDate(strtotime("2011-05-02 17:35:40")),
		"icon_url" => "",
		"legalese" => "[This document is a straw man example, based on a reworking of the HIPAA policy statement at www.hhs.gov/hipaafaq/providers/hipaa-1068.html.  It has not been reviewed by legal council, nor reviewed or approved by NLM or any other BHEPP member.]\n\n[The following is an example statement for attachment to a full record generated by \"TriagePic\".  Partial records (e.g., de-identified) have different statements.]\n\nNotice of Privacy Practices and Information Distribution\n========================================================\nRecords generated by NLM personnel during TriagePic testing do not generally represent real disaster victims.  Photos are most often of drill participants or NLM employees or contractors.\n\nFor any real disaster victim records gathered by a participating BHEPP hospital and provided to NLM:\n\nHospital records are generally covered by HIPAA, so the provided disaster victim information (the \"record\", which may include a photo) is governed by provisions of the HIPAA Privacy Rule.\n\nDuring a disaster, HIPPA permits disclosures for treatment purposes, and certain disclosures to disaster relief organizations (like the American Red Cross) so that family members can be notified of the patient\'s location.  (See CFR 164.510(b)(4).\n\nThe primary of purpose of the record is for family reunification.  Secondary usages may include in-hospital patient tracking, treatment/continuity-of-care on patient transfer, disaster situational awareness and resource management, and feedback to emergency medical service providers who provide pre-hospital treatment.  The record (in various forms) will be distributed within the originating hospital, within NLM (acting as if a hospital while testing by developers), and to and within the institutions with which NLM partners through the Bethesda Hospital Emergency Preparedness Partnership.  These are the NIH Clinical Center, Walter Reed National Medical Medical Hospital, and Suburban Hospital.  In particular, the record is sent to NLM\'s Person Locator database for exposure through the web site, with appropriate filtering and verification.  HIPAA allows patients to be listed in the facility directory, and some aspects of Person Locator are analogous to that.  For more, see the Notice of Privacy Practices associated with the PL web site.  \n\nThe record was generated by a \"TriagePic\" application, operated by BHEPP hospital personnel.  The application includes the ability to express the following [TO DO]:\n\n- patient agrees to let hospital personnel speak with family members or friends involved in the patient\'s care (45 CFR 164.510(b));\n- patient wishes to opt out of the facility directory (45 CFR 164.510(a));  [THIS MIGHT BE INTERPRETED AS OPTING OUT OF LPF.  MORE TO UNDERSTAND.]\n- patient requests privacy restrictions (45 CFR 164.522(a))\n- patient requests confidential communications (45 CFR 164.522(b))\n\n[IMPLICATIONS OF THESE CHOICES ON RECORD GENERATION NOT YET KNOWN.]\n\nIn addition, there is a requirement to distribute a notice of privacy practices, addressed by this attachment and the PL Notice of Privacy Practices.\n\nPenalties for non-compliance with the above five rules may be waived, for a limited time in a limited geographical area, if the President declares an emergency or disaster AND the Health and Human Services Secretary declares a public health emergency.  Within that declared timespan, a hospital may rely on the waiver (which covers all patients present) only from the moment of instituting its disaster protocol to at most 72 hours later.  For more, see www.hhs.gov/hipaafaq/providers/hipaa-1068.html.  The waiver is authorized under the Project Bioshield Act of 2004 (PL 108-276) and section 1135(b) of the Social Security Act.\n\nPhoto Copyright\n===============\nThe attached photo if any was taken by an employee, contractor, or volunteer of NLM or of another institutional member of the BHEPP partnership and may be in some cases copyrighted by that institution in the year given by the reporting date or earlier.  Reproduction and distribution is permitted to the extent governed by policy for the overall record.  Please credit the NLM and/or BHEPP and the staffers listed.",
		"legaleseAnon" => "[This document is a straw man example.  It has not been reviewed by legal council, nor reviewed or approved by NLM or any other BHEPP member.]\n\n[The following is an example statement for attachment to an anonymized, de-identified record generated by \"TriagePic\".  Full records (e.g., patient-identified) may have different statements.]\n\nNotice of Privacy Practices and Information Distribution\n========================================================\nThe attached record was generated by a \"TriagePic\" application, operated by NLM personnel with test data, or, less likely, by actual BHEPP-partner hospital personnel at the point where disaster victims arrive at the hospital.  While the application does generate real-time patient-specific information (text and photo), the attached record has been anonymized/de-identified to remove patient identifiers (e.g., no photo), and is intended for public release.  It retains categorial information on gender and adult-vs.-child (\"Peds\"), as well as arrival time, and the hospital personnel involved.  It is intended to be useful for disaster situational awareness and rate-of-arrival purposes.\n\nNo system of de-identification that retains any useful information is perfect.  The recipient who uses this record in an effort to re-identify patients is responsible for any legal ramifications and potential violations of HIPAA or other laws pertaining to patient confidentiality.",
		"legaleseTimestamp" => new MongoDate(strtotime("2011-10-04 16:53:01")),
		"legaleseAnonTimestamp" => new MongoDate(strtotime("2011-10-04 16:53:01")),
		"photo_required" => 1,
		"honor_no_photo_request" => 1,
		"photographer_name_required" => 0,
);

$collection->insert($document);

$document = array(
		"hospital_uuid" => 4,
		"name" => "Shady Grove Adventist Hospital",
		"short_name" => "Shady Grove",
		"street1" => "9901 Medical Center Drive",
		"street2" => "",
		"city" => "Rockville",
		"county" => "Montgomery",
		"region" => "MD",
		"postal_code" => "20850",
		"country" => "USA",
		"latitude" => 39.096975,
		"longitude" => -77.199597,
		"phone" => "(240) 826-6000",
		"fax" => "",
		"email" => "",
		"www" => "www.shadygroveadventisthospital.com",
		"npi" => "1376754457",
		"patient_id_prefix" => "",
		"patient_id_suffix_variable" => 1,
		"patient_id_suffix_fixed_length" => 0,
		"creation_time" => new MongoDate(strtotime("2011-09-16 14:22:01")),
		"icon_url" => "",
		"legalese" => "...",
		"legaleseAnon" => "...",
		"legaleseTimestamp" => new MongoDate(strtotime("2011-10-04 16:53:30")),
		"legaleseAnonTimestamp" => new MongoDate(strtotime("2011-10-04 16:53:30")),
		"photo_required" => 1,
		"honor_no_photo_request" => 1,
		"photographer_name_required" => 0
);

$collection->insert($document);

$document = array(
		"hospital_uuid" => 5,
		"name" => "Holy Cross Hospital",
		"short_name" => "Holy Cross",
		"street1" => "1500 Forest Glen Road",
		"street2" => "",
		"city" => "Silver Spring",
		"county" => "Montgomery",
		"region" => "MD",
		"postal_code" => "20910",
		"country" => "USA",
		"latitude" => 39.015784,
		"longitude" => -77.0359073,
		"phone" => "301-754-7000",
		"fax" => "",
		"email" => "",
		"www" => "www.holycrosshealth.org",
		"npi" => "1225067101",
		"patient_id_prefix" => "",
		"patient_id_suffix_variable" => 1,
		"patient_id_suffix_fixed_length" => 0,
		"creation_time" => new MongoDate(strtotime("2011-09-16 14:28:57")),
		"icon_url" => "",
		"legalese" => "...",
		"legaleseAnon" => "...",
		"legaleseTimestamp" => new MongoDate(strtotime("2011-10-04 16:53:47")),
		"legaleseAnonTimestamp" => new MongoDate(strtotime("2011-10-04 16:53:47")),
		"photo_required" => 1,
		"honor_no_photo_request" => 1,
		"photographer_name_required" => 0
);

$collection->insert($document);


$document = array(
		"hospital_uuid" => 7,
		"name" => "Virginia Hospital Center, Arlington",
		"short_name" => "VHC Arlington",
		"street1" => "1701 N. George Mason Drive",
		"street2" => "",
		"city" => "Arlington",
		"county" => "Arlington",
		"region" => "VA",
		"postal_code" => "22205-3698",
		"country" => "USA",
		"latitude" => 38.889643,
		"longitude" => -77.126661,
		"phone" => "(703) 558-5000",
		"fax" => "(703) 558-5787",
		"email" => "",
		"www" => "www.virginiahospitalcenter.com",
		"npi" => "1790785996",
		"patient_id_prefix" => "",
		"patient_id_suffix_variable" => 1,
		"patient_id_suffix_fixed_length" => 0,
		"creation_time" => new MongoDate(strtotime("2011-09-16 14:38:11")),
		"icon_url" => "",
		"legalese" => "...",
		"legaleseAnon" => "...",
		"legaleseTimestamp" => new MongoDate(strtotime("2011-10-04 16:53:57")),
		"legaleseAnonTimestamp" => new MongoDate(strtotime("2011-10-04 16:53:57")),
		"photo_required" => 1,
		"honor_no_photo_request" => 1,
		"photographer_name_required" => 0
);

$collection->insert($document);

$document = array(
		"hospital_uuid" => 8,
		"name" => "St. Francis BG",
		"short_name" => "SFBG",
		"street1" => "1600 Albany Street",
		"street2" => "",
		"city" => "Beech Grove",
		"county" => "",
		"region" => "Indiana",
		"postal_code" => "46107",
		"country" => "",
		"latitude" => 39,
		"longitude" => -77.101,
		"phone" => "",
		"fax" => "",
		"email" => "",
		"www" => "http://www.stfrancishospitals.org/DesktopDefault.aspx?tabid=67",
		"npi" => "1205931706",
		"patient_id_prefix" => "",
		"patient_id_suffix_variable" => 1,
		"patient_id_suffix_fixed_length" => 0,
		"creation_time" => new MongoDate(strtotime("2012-01-17 18:06:25")),
		"icon_url" => "",
		"legalese" => "",
		"legaleseAnon" => "",
		"legaleseTimestamp" => NULL,
		"legaleseAnonTimestamp" => NULL,
		"photo_required" => 1,
		"honor_no_photo_request" => 1,
		"photographer_name_required" => 0
);

$collection->insert($document);


$document = array(
		"hospital_uuid" => 9,
		"name" => "St. Francis IND",
		"short_name" => "STF-IND",
		"street1" => "8111 S Emerson Ave",
		"street2" => "",
		"city" => "Indianapolis",
		"county" => "",
		"region" => "IN",
		"postal_code" => "46237",
		"country" => "",
		"latitude" => 39.6483541,
		"longitude" => -86.0823324,
		"phone" => "(317) 528-5000",
		"fax" => "",
		"email" => "",
		"www" => "http://www.stfrancishospitals.org/DesktopDefault.aspx?tabid=67",
		"npi" => "1386749893",
		"patient_id_prefix" => "",
		"patient_id_suffix_variable" => 1,
		"patient_id_suffix_fixed_length" => 0,
		"creation_time" => new MongoDate(strtotime("2012-01-17 18:08:32")),
		"icon_url" => "",
		"legalese" => "",
		"legaleseAnon" => "",
		"legaleseTimestamp" => NULL,
		"legaleseAnonTimestamp" => NULL,
		"photo_required" => 1,
		"honor_no_photo_request" => 1,
		"photographer_name_required" => 0
);

$collection->insert($document);


//-------------------------end of hospital collection ----------------------------------

//--------------------------------image collection----------------------------------------------


$collection = $db->image ;
$document = array(
		"image_id" => new MongoInt64(0),
		"p_uuid" => "",
		"image_type" => "",
		"image_height" => 0,
		"image_width" => 0,
		"created" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"url" => "",
		"url_thumb" => "",
		"original_filename" => "",
		"principal" => 0,



);
$collection->insert($document);//checked

/*
 *  PRIMARY KEY  (`image_id`),
  KEY `p_uuid` (`p_uuid`),
  KEY `principal` (`principal`),
  CONSTRAINT `image_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/

//--------------------------------image_seq collection----------------------------------------------

$collection = $db->image_seq ;
$document = array(
		"id" => new MongoInt64(1)

);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`id`)
*/
//--------------------------------image_tag----------------------------------------------

$collection = $db->image_tag ;
$document = array(
		"tag_id" => 0,
		"image_id" => new MongoInt64(0),
		"tag_x" => 0,
		"tag_y" => 0,
		"tag_w" => 0,
		"tag_h" => 0,
		"tag_text" => ""

);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`tag_id`),
  KEY `tag_id` (`tag_id`,`image_id`),
  KEY `image_id` (`image_id`),
  CONSTRAINT `image_tag_ibfk_1` FOREIGN KEY (`image_id`) REFERENCES `image` (`image_id`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------image_tag_seq----------------------------------------------

$collection = $db->image_tag_seq ;
$document = array(
		"id" => new MongoInt64(1)

);
$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`id`)
*/
//--------------------------------incident----------------------------------------------

$collection = $db->incident ;
$document = array(
		"incident_id" => new MongoInt64(1),
		"parent_id" => Null,
		"search_id" => NULL,
		"name" => "Test Exercise",
		"shortname" => "test",
		"date" => new MongoDate(strtotime("2000-01-01 00:00:00")),
		"type" => "TEST",
		"latitude" => 0.0,
		"longitude" => 0.0,
		"default" => 1,
		"private_group" => NULL,
		"closed" => 0,
		"description" => "for the Test Exercise",
		"street" => "",
		"external_report" => ""

);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`incident_id`),
  UNIQUE KEY `shortname_idx` (`shortname`),
  KEY `parent_id` (`parent_id`),
  KEY `private_group` (`private_group`),
  CONSTRAINT `incident_ibfk_1` FOREIGN KEY (`private_group`) REFERENCES `sys_user_groups` (`group_id`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------incident_seq----------------------------------------------

$collection = $db->incident_seq ;
$document = array(
		"id" => new MongoInt64(2)

);
$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`id`)
*/
//--------------------------------mpres_log----------------------------------------------

$collection = $db->mpres_log ;
$document = array(
		"log_index" => 0,
		"p_uuid" => "",
		"email_subject" => "",
		"email_from" => "",
		"email_date" => "",
		"update_time" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"xml_format" => ""


);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`log_index`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `mpres_log_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------mpres_messages----------------------------------------------

$collection = $db->mpres_messages ;
$document = array(
		"ix" => 0,
		"when" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"messages" => "",
		"error_code" => 0

);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`ix`)
*/
//--------------------------------mpres_seq----------------------------------------------

$collection = $db->mpres_seq ;
$document = array(
		"id" => new MongoInt64(1),
		"last_executed" => new MongoDate(strtotime("2012-04-01 04:00:00")),
		"last_message" => ""


);
$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`id`)
*/
//--------------------------------old_passwords----------------------------------------------

$collection = $db->old_passwords ;
$document = array(
		"p_uuid" => "",
		"password" => "",
		"changed_timestamp" => new MongoInt64(0)

);
$collection->insert($document);//checked
/*
 *  PRIMARY KEY  (`p_uuid`,`password`)
*/
//--------------------------------password_event_log----------------------------------------------

$collection = $db->password_event_log ;
$document = array(
		"log_id" => new MongoInt64(1),
		"changed_timestamp" => new MongoDate(strtotime("2013-03-12 18:13:15")),
		"p_uuid" => "1",
		"user_name" => "root",
		"comment" => "Login Failed : Invalid Password.",
		"event_type" => "1"

);
$collection->insert($document);
/*
 *PRIMARY KEY  (`log_id`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `password_event_log_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------person_deceased----------------------------------------------

$collection = $db->person_deceased ;
$document = array(
		"deceased_id" => 0,
		"p_uuid" => "",
		"details" => "",
		"date_of_death" => new MongoDate(strtotime("2013-03-12 18:13:15")),
		"location" => "",
		"place_of_death" => "",
		"comments" => ""


);
$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`deceased_id`),
  UNIQUE KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `person_deceased_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------person_details----------------------------------------------

$collection = $db->person_details ;
$document = array(
		"details_id" => 2995458,
		"p_uuid" => "3",
		"birth_date" => NULL,
		"opt_race" => NULL,
		"opt_religion" => NULL,
		"opt_gender" => NULL,
		"years_old" => NULL,
		"minAge" => NULL,
		"maxAge" => NULL,
		"last_seen" => NULL,
		"last_clothing" => NULL,
		"other_comments" => NULL


);
$collection->insert($document);


$document = array(
		"details_id" => 2996977,
		"p_uuid" => "4",
		"birth_date" => NULL,
		"opt_race" => NULL,
		"opt_religion" => NULL,
		"opt_gender" => NULL,
		"years_old" => NULL,
		"minAge" => 18,
		"maxAge" => 150,
		"last_seen" => "NLM (testing) Hospital",
		"last_clothing" => NULL,
		"other_comments" => "LPF notification - disaster victim arrives at hospital triage station"


);
$collection->insert($document);
//checked
/*
 *  PRIMARY KEY  (`details_id`),
  UNIQUE KEY `p_uuid` (`p_uuid`),
  KEY `opt_gender` (`opt_gender`),
  KEY `years_old` (`years_old`),
  CONSTRAINT `person_details_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------person_followers----------------------------------------------

$collection = $db->person_followers ;
$document = array(
		"id" => 0,
		"p_uuid" => "",
		"follower_p_uuid" => ""

);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`id`),
  KEY `p_uuid` (`p_uuid`),
  KEY `follower_p_uuid` (`follower_p_uuid`),
  CONSTRAINT `person_followers_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `person_followers_ibfk_2` FOREIGN KEY (`follower_p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------person_notes----------------------------------------------

$collection = $db->person_notes ;
$document = array(
		"note_id" => 0,
		"note_about_p_uuid" => "",
		"note_written_by_p_uuid" => "",
		"note" => "",
		"when" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"suggested_status" => ""

);
$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`note_id`),
  KEY `note_about_p_uuid` (`note_about_p_uuid`),
  KEY `note_written_by_p_uuid` (`note_written_by_p_uuid`),
  CONSTRAINT `person_notes_ibfk_1` FOREIGN KEY (`note_about_p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `person_notes_ibfk_2` FOREIGN KEY (`note_written_by_p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------person_physical----------------------------------------------

$collection = $db->person_physical ;
$document = array(
		"physical_id" => 0,
		"p_uuid" => "",
		"opt_blood_type" => "",
		"height" => "",
		"weight" => "",
		"opt_eye_color" => "",
		"opt_skin_color" => "",
		"opt_hair_color" => "",
		"injuries" => "",
		"comments" => ""

);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`physical_id`),
  UNIQUE KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `person_physical_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------person_search----------------------------------------------

$collection = $db->person_search ;
$document = array(
		"p_uuid" => "",
		"full_name" => "",
		"given_name" => "",
		"family_name" => "",
		"expiry_date" => new MongoDate(strtotime("2010-01-15 00:00:00")) ,
		"updated" => new MongoDate(strtotime("2010-01-15 00:00:00")) ,
		"updated_db" => new MongoDate(strtotime("2010-01-15 00:00:00")) ,
		"opt_status" => "",
		"opt_gender" => "",
		"years_old" => new MongoInt64(0),
		"minAge" => new MongoInt64(0),
		"maxAge" => new MongoInt64(0),
		"ageGroup" => "",
		"image_height" => 0,
		"image_width" => 0,
		"url_thumb" => "",
		"icon_url" => "",
		"shortname" => "",
		"hospital" => "",
		"comments" => "",
		"last_seen" => "",
		"mass_casualty_id" => ""

);
$collection->insert($document);//checked
/*
 *
*/

// --------------------------------------- end of other---------------------------------------------------------------


//-------------------------------------------------------Samila-----------------------------------------

//--------------------------------person_seq----------------------------------------------
$collection = $db->person_seq; //select a collection

$document = array(
		"id" => 100
);

$collection->insert($document);//checked
/*
 *
*/
//--------------------------------person_status----------------------------------------------

$collection = $db->person_status; //select a collection

$document = array(
		"status_id" => 0,
		"p_uuid" => "",
		"opt_status"=>"",
		"last_updated"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"creation_time"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"last_updated_db"=> new MongoDate(strtotime("2010-01-15 00:00:00"))

);

$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`status_id`),
  UNIQUE KEY `p_uuid` (`p_uuid`),
  KEY `last_updated_db` (`last_updated_db`),
  KEY `opt_status` (`opt_status`),
  KEY `last_updated` (`last_updated`),
  CONSTRAINT `person_status_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------person_to_report----------------------------------------------

$collection = $db->person_to_report; //select a collection

$document = array(
		"p_uuid" => "",
		"rep_uuid" => ""
);

$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`p_uuid`,`rep_uuid`),
  KEY `rep_uuid` (`rep_uuid`),
  CONSTRAINT `person_to_report_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------person_updates----------------------------------------------

$collection = $db->person_updates; //select a collection

$document = array(
		"update_index" => 0,
		"p_uuid" => "",
		"update_time"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"updated_table"=> "",
		"updated_column"=> "",
		"old_value"=> "",
		"new_value"=> "",
		"updated_by_p_uuid"=> ""
);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`update_index`),
  KEY `p_uuid` (`p_uuid`),
  KEY `updated_by_p_uuid` (`updated_by_p_uuid`),
  CONSTRAINT `person_updates_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `person_updates_ibfk_2` FOREIGN KEY (`updated_by_p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------person_uuid----------------------------------------------

$collection = $db->person_uuid; //select a collection

$document = array(
		"p_uuid" => "1",
		"full_name" => "Root/",
		"family_name"=>"/",
		"given_name"=> "Root",
		"incident_id"=> new MongoInt64(0),
		"hospital_uuid"=> 0,
		"expiry_date"=> new MongoDate(strtotime("2010-01-15 00:00:00"))
);
$collection->insert($document);

$document = array(
		"p_uuid" => "2",
		"full_name" => "Email System",
		"family_name"=>"System",
		"given_name"=> "Email",
		"incident_id"=> new MongoInt64(0),
		"hospital_uuid"=> 0,
		"expiry_date"=> new MongoDate(strtotime("2010-01-15 00:00:00"))
);
$collection->insert($document);

$document = array(
		"p_uuid" => "3",
		"full_name" => "Anonymous User",
		"family_name"=>"User",
		"given_name"=> "Anonymous",
		"incident_id"=> new MongoInt64(0),
		"hospital_uuid"=> 0,
		"expiry_date"=> new MongoDate(strtotime("2010-01-15 00:00:00"))
);
$collection->insert($document);

$document = array(
		"p_uuid" => "4",
		"full_name" => "TestFrom WebServices",
		"family_name"=>"WebServices",
		"given_name"=> "TestForm",
		"incident_id"=> new MongoInt64(0),
		"hospital_uuid"=> 0,
		"expiry_date"=> new MongoDate(strtotime("2010-01-15 00:00:00"))
);

$collection->insert($document);
//checked
/*
 *PRIMARY KEY  (`p_uuid`),
  KEY `full_name_idx` (`full_name`),
  KEY `incident_id_index` (`incident_id`),
  KEY `hospital_index` (`hospital_uuid`),
  CONSTRAINT `person_uuid_ibfk_1` FOREIGN KEY (`incident_id`) REFERENCES `incident` (`incident_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `person_uuid_ibfk_2` FOREIGN KEY (`hospital_uuid`) REFERENCES `hospital` (`hospital_uuid`) ON DELETE SET NULL ON UPDATE CASCADE
*/
//--------------------------------pfif_export_log----------------------------------------------

$collection = $db->pfif_export_log; //select a collection

$document = array(
		"log_index" => 0,
		"repository_id" => 0,
		"direction"=> "",
		"status"=> "",
		"start_mode"=> "",
		"start_time"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"end_time"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"first_entry"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"last_entry"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"last_count"=> 0,
		"person_count"=> 0,
		"note_count"=> 0
);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`log_index`),
  KEY `repository_id` (`repository_id`),
  CONSTRAINT `pfif_export_log_ibfk_1` FOREIGN KEY (`repository_id`) REFERENCES `pfif_repository` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `pfif_export_log_ibfk_2` FOREIGN KEY (`repository_id`) REFERENCES `pfif_repository` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------pfif_harvest_note_log----------------------------------------------

$collection = $db->pfif_harvest_note_log; //select a collection

$document = array(
		"log_index" => 0,
		"repository_id" => 0,
		"direction"=> "",
		"status"=> "",
		"start_mode"=> "",
		"start_time"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"end_time"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"first_entry"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"last_entry"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"last_count"=> 0,
		"note_count"=> 0
);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`log_index`),
  KEY `repository_id` (`repository_id`),
  CONSTRAINT `pfif_harvest_note_log_ibfk_1` FOREIGN KEY (`repository_id`) REFERENCES `pfif_repository` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `pfif_harvest_note_log_ibfk_2` FOREIGN KEY (`repository_id`) REFERENCES `pfif_repository` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------pfif_harvest_person_log----------------------------------------------

$collection = $db->pfif_harvest_person_log; //select a collection
$document = array(
		"log_index" => 0,
		"repository_id" => 0,
		"direction"=> "",
		"status"=> "",
		"start_mode"=> "",
		"start_time"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"end_time"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"first_entry"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"last_entry"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"last_count"=> 0,
		"person_count"=> 0,
		"images_in"=>0,
		"images_retried"=>0,
		"images_failed"=>0
);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`log_index`),
  KEY `repository_id` (`repository_id`),
  CONSTRAINT `pfif_harvest_person_log_ibfk_1` FOREIGN KEY (`repository_id`) REFERENCES `pfif_repository` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------pfif_note----------------------------------------------

$collection = $db->pfif_note; //select a collection
$$document = array(
		"note_record_id" => "",
		"p_uuid" => "",
		"source_version"=> "",
		"source_repository_id"=> 0,
		"linked_person_record_id"=> "",
		"entry_date"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"author_name"=> "",
		"author_email"=> "",
		"author_phone"=> "",
		"source_date"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"found"=> "",
		"status"=> "",
		"email_of_found_person"=> "",
		"phone_of_found_person"=> "",
		"last_known_location"=>"",
		"text"=>""
);//text
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`note_record_id`),
  KEY `p_uuid` (`p_uuid`),
  KEY `source_repository_id` (`source_repository_id`),
  KEY `linked_person_record_id` (`linked_person_record_id`)
*/
//--------------------------------pfif_note_seq----------------------------------------------

$collection = $db->pfif_note_seq; //select a collection
$$document = array(
		"id"=> 1
);
$collection->insert($document);//checked
/*
 *
*/
//--------------------------------pfif_person----------------------------------------------

$collection = $db->pfif_person; //select a collection
$document = array(
		"p_uuid" => "",
		"source_version"=> "",
		"source_repository_id"=> 0,
		"entry_date"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"expiry_date"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"author_name"=> "",
		"author_email"=> "",
		"author_phone"=> "",
		"source_name"=> "",
		"source_date"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"source_url"=> "",
		"full_name"=> "",
		"first_name"=> "",
		"last_name"=> "",
		"home_city"=> "",
		"home_state"=>"",
		"home_country"=> "",
		"home_neighborhood"=> "",
		"home_street"=> "",
		"home_postal_code"=> "",
		"photo_url"=> "",
		"sex"=> "",
		"date_of_birth"=> new MongoDate(strtotime("2010-01-15 00:00:00")),//date
		"age"=> "",
		"other"=> ""
);
$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`p_uuid`),
  KEY `source_repository_id` (`source_repository_id`)
*/
//--------------------------------pfif_repository----------------------------------------------

$collection = $db->pfif_repository; //select a collection
$document = array(
		"id"=> 0,
		"name"=> "",
		"incident_id"=> new MongoInt64("0"),
		"base_url"=> "",
		"subdomain"=> "",
		"auth_key"=> "",
		"resource_type"=> "",
		"role"=> "",
		"granularity"=> "",
		"deleted_record"=> "",
		"sched_interval_minutes"=> 0,
		"log_granularity"=> "",
		"first_entry"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"last_entry"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"total_persons"=> 0,
		"total_notes"=> 0
);
$collection->insert($document);//checked
/*
 * PRIMARY KEY  (`id`),
  KEY `incident_id` (`incident_id`),
  CONSTRAINT `pfif_repository_ibfk_1` FOREIGN KEY (`incident_id`) REFERENCES `incident` (`incident_id`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------phonetic_word----------------------------------------------

$collection = $db->phonetic_word; //select a collection
$document =array(
		"encode1"=> "",
		"encode2"=> "",
		"pgl_uuid"=> ""
);
$collection->insert($document);//checked
/*
 *
*/
//--------------------------------plus_access_log----------------------------------------------

$collection = $db->plus_access_log; //select a collection
$document =array(
		"access_id"=> 0,
		"access_time"=> new MongoDate(strtotime("2010-01-15 00:00:00")),
		"application"=> "",
		"version"=> "",
		"ip"=> "",
		"call"=>"",
		"api_version"=> "",
		"latitude"=> 0.0,
		"longitude"=> 0.0,
		"user_name"=> ""
);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`access_id`),
  KEY `user_idx` (`user_name`),
  KEY `ip_idx` (`ip`),
  CONSTRAINT `plus_access_log_ibfk_1` FOREIGN KEY (`user_name`) REFERENCES `users` (`user_name`) ON DELETE CASCADE ON UPDATE CASCADE
*/

//-------------------------------------- nadeera---------------------------------------------------------------
//--------------------------------plus_report_log----------------------------------------------
$collection=$db->plus_report_log;//select a collection
$document = array(
		"report_id" => 0,
		"p_uuid" => "",
		"report_time" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"enum" => ""
);

$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`report_id`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `plus_report_log_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------pop_outlog----------------------------------------------
$collection=$db->pop_outlog;//select a collection
$document = array(
		"outlog_index" => 0,
		"mod_accessed" => "",
		"time_sent" => new MongoDate(strtotime("2010-01-15 00:00:00")),
		"send_status" => "",
		"error_message" => "",
		"email_subject" => "",
		"email_from" => "",
		"email_recipients" => ""
);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`outlog_index`)
*/
//--------------------------------rap_log----------------------------------------------
$collection=$db->rap_log;//select a collection
$document = array(
		"rap_id" => 0,
		"p_uuid" => "",
		"report_time" => new MongoDate(strtotime("2010-01-15 00:00:00"))
);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`rap_id`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `rap_log_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------rez_pages----------------------------------------------
$collection=$db->rez_pages;//select a collection
$document = array(
		"rez_page_id" => -45,
		"rez_menu_title" => "PLUS Web Service API",
		"rez_menu_order" => 38,
		"rez_content" => "<a href=\"https://docs.google.com/document/d/17pApAVZvg4g93sjZOY3Rp8-MfSu8wSRMycUca3LXNJc/edit?hl=en_US\">Click here to open the Google Doc for the PLUS Web Services</a><br>",
		"rez_timestamp" => new MongoDate(strtotime("2012-03-02 02-59-28")),
		"rez_visibility" => "Hidden" );

$collection->insert($document);
$document = array(
		"rez_page_id" => -30,
		"rez_menu_title" => "ABOUT",
		"rez_menu_order" => 36,
		"rez_content" => "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"><span class=\"Apple-style-span\" style=\"font-family: \'Times New Roman\'; font-size: medium; \"><pre style=\"word-wrap: break-word; white-space: pre-wrap; \">Some of the Sahana Agasti modules are being actively developed, maintained, or customized by the U.S. National Library of Medicine (NLM), located on the National Institutes of Health (NIH) campus in Bethesda, Maryland. NLM is in a community partnership with 3 nearby hospitals (National Naval Medical Center, NIH Clinical Center, Suburban Hospital) to improve emergency responses to a mass disaster impacting those hospitals. The partnership, called the Bethesda Hospitals\' Emergency Preparedness Partnership (BHEPP), received initial federal funding for LPF and other NLM IT projects in 2008-9. The LPF project is currently supported by the Intramural Research Program of the NIH, through NLMÃ¢â‚¬â„¢s Lister Hill National Center for Biomedical Communications (LHNCBC). Software development is headed by LHNCBC\'s Communication Engineering Branch (CEB), with additional content from LHNCBC\'s Computer Science Branch (CSB) and the Disaster Information Management Research Center (DIMRC), part of NLM\'s Specialized Information Services.</pre></span>",
		"rez_timestamp" => new MongoDate(strtotime("2012-03-01 21:29:33")),
		"rez_visibility" => "Hidden" );

$collection->insert($document);

$document = array(
		"rez_page_id" => -20,
		"rez_menu_title" => "Access Denied",
		"rez_menu_order" => -20,
		"rez_content" => "You do not have permission to access this event. If you believe this is in error, please contact lpfsupport@mail.nih.gov",
		"rez_timestamp" => new MongoDate(strtotime("2011-06-14 16:59:53")),
		"rez_visibility" => "Hidden" );

$collection->insert($document);

$document = array(
		"rez_page_id" => -6,
		"rez_menu_title" => "Password Reset.",
		"rez_menu_order" => 8,
		"rez_content" => "<div><br></div><div>Your password has been successfully reset and the new password emailed to you.</div>",
		"rez_timestamp" => new MongoDate(strtotime("2011-06-14 17:09:49")),
		"rez_visibility" => "Hidden" );

$collection->insert($document);

$document = array(
		"rez_page_id" => -5,
		"rez_menu_title" => "Account activated.",
		"rez_menu_order" => 38,
		"rez_content" => "<div><br></div><div>Your account has been successfully activated. You may now <a href=\"index.php?mod=pref&amp;act=loginForm\" title=\"login\" target=\"\">login to the site</a> to begin using it.</div>",
		"rez_timestamp" => new MongoDate(strtotime("2011-06-14 17:09:49")),
		"rez_visibility" => "Hidden" );

$collection->insert($document);

$document = array(
		"rez_page_id" => -4,
		"rez_menu_title" => "Account already active.",
		"rez_menu_order" => 6,
		"rez_content" => "<div><br></div><div>This confirmation link is no longer valid. The account attached to it is already active.</div>",
		"rez_timestamp" => new MongoDate(strtotime("2011-06-14 17:06:55")),
		"rez_visibility" => "Hidden" );

$collection->insert($document);

$document = array(
		"rez_page_id" => 11,
		"rez_menu_title" => "How do I search for a person?",
		"rez_menu_order" => 14,
		"rez_content" => "<h2>Searching</h2>\n1) Enter a name in the search box<br>\n2) Click on the \"Search\" button, or hit Enter <br>\n<br>\n<i>Examples:</i><br>\n<br>\n Joseph Doe<br>\n Doe, Jane<br>\n Joseph Joe Joey<br>\n<br>\nIt is best to leave off titles (\"Dr.\", \"Mrs.\") and suffixes (\"Jr\") at this time.<br>\n<br>\n<br>\n<h2>Search Options</h2>\nOnce you have performed a search, you may also limit your results by status, gender, and age.<br>\n<br>\nStatus choices are missing (blue), alive and well (green), injured (red), deceased (black), found (brown) or unknown (gray).<br>\n<br>\nGender choices are male, female, and other/unknown.<br>\n<br>\nAge choices are 0-17, 18+, or unknown.<br><br>If you want to see only records that have photos, include \"[image]\" in the search box.&nbsp; Use \"[-image]\" to see only records that have no photos.<br>\n<br>\n<br>\n<h2>Results</h2>\nResults include any of the search terms.&nbsp; To tolerate misspellings, results are not limited to exact matches.&nbsp; Matches may include names found in certain fields, like Notes, that will be visible only if you consult the record\'s details.<br>\n<br>\nUnder the search box is the number of records found that match your search, and the total number in the database (e.g., Found 2 out of 43).<br>\n<br>\nYou may sort your results by Time, Name, Age, or Status.&nbsp; By Name orders by last name, then within that, first.&nbsp; By Age will use a calculated midpoint age for each record with an age range. <br>\n<br>\nInteractive mode displays results by page.  The default is 25 per page.  You may change it to 50 or 100 per page via the pull down menu at the top of the results.<br>\n<br>\nHands Free mode displays results as several horizontally-scrolling rows of boxes with a photograph or text.  The boxes always distribute themselves evenly among the rows, starting at the right side and from top row to bottom.  If there are more boxes than can be shown at once, the rows will become animated to scroll horizontally with wrap-around.  There is no meaning to the ordering of the images at this time.<br>\n<br>\n<br>\n<h2>Getting Details about a Given Results<br></h2>\nClick on the results (photo or text) for more information.<br>\n<br>\n<br>\n<h2>Pause and Play Buttons</h2>\nIf horizontal scrolling is occurring, Pause will stop that, and Play will resume it.  Even while paused, the search will be repeated every minute to look for fresh content.<br>\n<br>\n<br>\n<h2>Search and Data Updates</h2>\nOnce a set of results for a search is loaded, the search will be quietly repeated every minute to see if there is new content.<br><br>New Information can be input via the Report a Person page, or sent to us directly by email or web service, e.g., from apps like ReUnite and TriagePic.\n<br>\n<br><br>",
		"rez_timestamp" => new MongoDate(strtotime("2011-11-22 20:39:09")),
		"rez_visibility" => "Public" );

$collection->insert($document);

$document = array(
		"rez_page_id" => 24,
		"rez_menu_title" => "Links to other organizations",
		"rez_menu_order" => 35,
		"rez_content" => "<h2>Find Family and Friends</h2>\n<a href=\"https://safeandwell.communityos.org/cms//\" title=\"Red Cross Safe and Well List\">Red Cross Safe and Well List</a><br>\n<a href=\"http://www.nokr.org/nok/restricted/home.htm\" title=\"Next of Kin National Registry\">Next of Kin National Registry</a><br>\n<a href=\"http://www.lrcf.net/create-flyer/\" title=\"Missing Person Flier Creation Tools\">Missing Person Flier Creation Tools</a><br>\n<br>\n\n<h2>Disaster Resources - General</h2>\n<a target=\"\" title=\"Disaster Assistance\" href=\"http://www.disasterassistance.gov/\">Disaster Assistance</a><br>\n<a href=\"http://app.redcross.org/nss-app/\" title=\"Red Cross Provides Shelters and Food\">Red Cross Provides Shelters and Food</a><br>\n<a target=\"\" title=\"NLM\'s Disaster Information Management Resource Center\" href=\"http://disasterinfo.nlm.nih.gov\">NLM\'s Disaster Information Management Resource Center</a>, currently highlighting flood and hurricane information.<br> \n\n<h2>Disaster Resources - Tornadoes</h2>\n<a target=\"\" title=\"Tornado Information from the Disaster Information Management Resource Center\" href=\"http://disaster.nlm.nih.gov/enviro/tornados.html\">From the Disaster Information Management Resource Center</a><br>\n<a target=\"\" title=\"Tornado Information  from MedlinePlus\" href=\"http://www.nlm.nih.gov/medlineplus/tornadoes.html\">From MedlinePlus</a><br>\n<a target=\"\" title=\"NOAA 2011 Tornado Information\" href=\"http://www.noaanews.noaa.gov/2011_tornado_information.html\">From NOAA 2011</a><br>\n<a target=\"\" title=\"From Joplin Globe\'s Facebook page\" href=\"http://www.poynter.org/latest-news/making-sense-of-news/133446/joplin-globes-facebook-page-locates-reunites-missing-people-in-tornado-aftermath/\">About Joplin Globe\'s Facebook page -  locates, reunites missing people in tornado aftermath</a>\n\n\n\n\n",
		"rez_timestamp" => new MongoDate(strtotime("2012-03-01 21:29:37")),
		"rez_visibility" => "Public" );

$collection->insert($document);

$document = array(
		"rez_page_id" => 43,
		"rez_menu_title" => "How do I report a missing or found person?",
		"rez_menu_order" => 18,
		"rez_content" => "<div style=\"\">\n<script type=\"text/javascript\" src=\"res/js/jquery-1.4.4.min.js\"></script>\n<script type=\"text/javascript\" src=\"res/js/animatedcollapse.js\"></script>\n<script>\nanimatedcollapse.addDiv(\'more_reunite_en\', \'fade=1,hide=1\');\nanimatedcollapse.addDiv(\'more_email_en\', \'fade=1,hide=1\');\nanimatedcollapse.addDiv(\'more_reunite_es\', \'fade=1,hide=1\');\nanimatedcollapse.addDiv(\'more_email_es\', \'fade=1,hide=1\');\nanimatedcollapse.addDiv(\'more_reunite_fr\', \'fade=1,hide=1\');\nanimatedcollapse.addDiv(\'more_email_fr\', \'fade=1,hide=1\');\nanimatedcollapse.init();\nanimatedcollapse.ontoggle=function($, divobj, state){}\n</script>\n\n<h1>Reporting a Missing or Found Person</h1>\n<ul>\n  <li><b>By Browser.</b> Use the \"Report a Person\" link at left.  This is the way to update a report, too.</li>\n  <li><b>By iPhone, iPod Touch, or iPad.</b> Get our free <a href=\"http://lpf.nlm.nih.gov/\" title=\"\">â€œReUniteâ€� app</a> from the Apple Store (<a href=\"#reunite_en\">details...</a>).</li>\n  <li><b>By Email.</b> Put name and status in the subject line, as in \"Jane Doe missing\", attach a photo, and send to <a href=\"mailto:disaster@mail.nih.gov\">disaster@mail.nih.gov</a> (<a href=\"#email_en\">details...</a>).</li>\n  <li><b>By Specialized Software for Hospitals.</b> Ask NLM about our \"TriagePic\" Windows software for triage stations.</li>\n</ul>\n<br>\n<p>[<a href=\"#reporting_es\">[TO DO: In Spanish]</a>]</p>\n<p>[<a href=\"#reporting_fr\">En FranÃ§ais</a>]</p>\n<br>\n<h1>Details</h1>\n\n<a id=\"reunite_en\"><br><h4>Reporting using our iPhoneâ„¢ App, â€œReUniteâ€�</h4></a>\n\nOf particular interest to aid workers, we provide a free iPhone app called <a href=\"http://lpf.nlm.nih.gov/\" title=\"\">ReUnite</a> through the Apple Store.&nbsp;\nThis creates structured content with associated photographs (limited to 1 per submission so far).&nbsp;\nMore information can be transmitted to us this way than using the unstructured email method below.<br>\n<br>\nReUnite currently supports iPhone 3G and iPhone 4 with iPhone OS 3.0 or later.&nbsp; iPod Touch and iPad are also usable.<br>\n<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:animatedcollapse.toggle(\'more_reunite_en\')\">Show/Hide More...</a>\n<br>\n<br>\n<div id=\"more_reunite_en\" display=\"none;\">\nUsers can choose to take a new photo using their iPhoneâ€™s camera\nor use an existing image from their camera roll/photo library.&nbsp;\nThey are then able to tag certain information about the person in the photo.&nbsp;\nThe following fields, all optional, are available for editing:<br>\n    <ul>\n      <li>Given Name</li>\n      <li>Family Name</li>\n      <li>Health Status: (Alive &amp; Well / Injured / Deceased / Unknown)</li>\n      <li>Gender: (Male / Female / Unknown)</li>\n      <li>Age Group: (0-17 / 18+ / Unknown) <i>(or enter an estimated age instead)</i></li>\n      <li>Estimated Age, in years</li>\n      <li>Location Status: (Missing / Known)</li>\n      <li>Last Known Location <i>(if missing)</i> / Current Location <i>(otherwise)</i></li>\n    </ul>\n    <p>Street <i>(typically)</i></p>\n    <p>Town <i>(typically)</i></p>\n    <ul>\n      <li>ID Tag <i>Automatically generated by default. Aid workers can substitute organizationâ€™s triage number.</i></li>\n      <li>Voice Note</li>\n      <li>Text Note</li>\n    </ul>\n    <p>In addition, the following info is generated at the time the record is created:</p>\n    <ul>\n      <li>GPS Location <span style=\"font-style: italic;\">(if enabled)</span><br></li>\n      <li>Date and time</li>\n    </ul>\nThe image and corresponding information can then be sent by web service (or as backup, by email) to the PL server automatically.&nbsp;\n    The info is also embedded into the imageâ€™s EXIF tags.&nbsp;\n    The records (including photos) are stored locally on the iPhone in an SQLite database format.&nbsp;\n    This database can be sent by email to <a href=\"mailto:lpfsupport@mail.nih.gov\">lpfsupport@mail.nih.gov</a>,\n    where support personnel can arrange to have it included in our database.&nbsp;\n    Consequently, data can be collected when cell phone connectivity is not available,\n    and subsequently sent when connectivity becomes available.<br>\n</div>\n<br>\n<a id=\"email_en\"><br><h4>Quick Reporting by Email of Name, Status, and Photo</h4></a>\n\nYou may also report a name and simple status directly to us by email (such as by cell phone).  You may also attach a photograph (limited to 1 at the moment).  Acceptable formats are .jpg (or .jpeg), .png, and .gif . For now, content in the email body is ignored.<br>\n<br>\n<p>Email to: <a href=\"mailto:disaster@mail.nih.gov\">disaster@mail.nih.gov</a></p>\n<p>Subject Line: <i>Name of Missing or Found Person</i> <b>Status</b></p>\n<p>where <b>Status</b>, whose case doesn\'t matter, is</p>\n<ul>\n   <li>Missing</li>\n   <li>Alive and Well</li>\n   <li>Injured</li>\n   <li>Deceased</li>\n   <li>Found <i>(but it\'s better to use a status that indicates health too)</i></li>\n</ul>\n<br>\nExample of subject line: â€œJean Baptiste alive and wellâ€�<br>\nPunctuation will be treated as spaces.<br>\n<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:animatedcollapse.toggle(\'more_email_en\')\">Show/Hide More...</a>\n<br>\n<br>\n<div id=\"more_email_en\" display=\"none;\">\n<p><b>Table of Status Words</b></p>\n <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n  <tbody><tr>\n   <td valign=\"top\" width=\"163\"><p><b>Status Assumed</b></p></td>\n   <td valign=\"top\" width=\"811\"><p><b>Recognized words in subject line (case doesnâ€™t matter)</b></p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Missing</p></td>\n   <td valign=\"top\" width=\"811\"><p>missing, lost, looking for, [to] find</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"></td>\n   <td valign=\"top\" width=\"811\"><p>French: disparu, perdu, trouver, a la recherche de, trouver [SUITE: Ã  la recherche de]</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Alive and Well</p></td>\n   <td valign=\"top\" width=\"811\"><p>alive, well, okay, OK, good, healthy, recovered, fine</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"></td>\n   <td valign=\"top\" width=\"811\"> <p>French: en vie, vivant, ok, bien portant, en bonne sante, gueri [SUITE: en bonne santÃ©, guÃ©ri]</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Injured</p></td>\n   <td valign=\"top\" width=\"811\"><p>injured, hurt, wounded, sick, treated, recovering</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"></td>\n   <td valign=\"top\" width=\"811\"><p>French: blesse, mal en point, malade, soigne, convalscent [SUITE: blessÃ©, soignÃ©]</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Deceased</p></td>\n   <td valign=\"top\" width=\"811\"><p>deceased, dead, died, buried</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"></td>\n   <td valign=\"top\" width=\"811\"><p>French: decede, mort, inhume [SUITE: dÃ©cÃ©dÃ©, inhumÃ© ]</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Found</p></td>\n   <td valign=\"top\" width=\"811\"><p>found</p></td>\n  </tr>\n </tbody></table>\n<p>When entering Status:</p>\n<ul>\n   <li>Avoid using the word â€œnotâ€�</li>\n   <li>Avoid using the word â€œfoundâ€� alone, without further indicating health status in one of the three categories.</li>\n</ul>\n</div>\n<br>\n<hr>\n<br>\n<a id=\"reporting_es\"><br><h1>Creando un reporte [TO DO: about a Missing or Found Person][TRANSLATION IN PROGRESS]</h1></a>\n    <br>\n	[TO DO: Bullet points]<br>\n<ul>\n  <li><b>By Browser.</b> Use the \"Report a Person\" link at left.  This is the way to update a report, too.</li>\n  <li><b>By iPhone, iPod Touch, or iPad.</b> Get our free <a href=\"http://lpf.nlm.nih.gov/\" title=\"\">â€œReUniteâ€� app</a> from the Apple Store (<a href=\"#reunite_es\">details...</a>).</li>\n  <li><b>By Email.</b> Put name and status in the subject line, as in \"Jane Doe missing\", attach a photo, and send to <a href=\"mailto:disaster@mail.nih.gov\">disaster@mail.nih.gov</a> (<a href=\"#email_es\">details...</a>).</li>\n  <li><b>By Specialized Software for Hospitals.</b> Ask NLM about our \"TriagePic\" Windows software for triage stations.</li>\n</ul>\n<br>\n<h3>[TO DO: Details]</h3>\n	<a id=\"reunite_es\"><h4>Enviando un reporte mediante la aplicaciÃ³n de iPHone, \"ReUnite\"</h4></a>\n    De particular interÃ©s para los trabajadores humanitarios, ofrecemos una aplicaciÃ³n libre de costo para el iPhone llamada\n    <a href=\"http://itunes.apple.com/us/app/reunite/id368052994?mt=8\" title=\"\">ReUnite</a> a travÃ©s del \"Apple Store\".&nbsp;\n    Esta aplicaciÃ³n crea un mensaje electrÃ³nico con un contenido estructurado con fotografÃ­as asociadas (limitado a 1 por reporte por el momento).\n    Esta aplicaciÃ³n de iPhone permite proporcionar mÃ¡s informaciÃ³n que mediante el mÃ©todo de correo electrÃ³nico no estructurado explicado arriba.\n    <br><br>\n    \"ReUnite\" actualmente soporta iPhone 3G y iPhone 4 con iPhone OS 3.0 o una versiÃ³n mÃ¡s actual.<br>\n	{TO DO: iPod Touch and iPad are also usable.]<br>\n<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:animatedcollapse.toggle(\'more_reunite_es\')\">{TO DO]Show/Hide More...</a>\n<br>\n<br>\n<div id=\"more_reunite_es\" display=\"none;\">\n    Los usuarios pueden elegir tomar una nueva foto usando la cÃ¡mara de su iPhone o utilizar una imagen existente en su cÃ¡mara, en su colecciÃ³n de fotografÃ­as\n    digitales. Luego de eso, pueden  etiquetar la fotografÃ­a con cierta informaciÃ³n sobre la persona. Los siguientes campos, todos opcionales, estÃ¡n disponibles para ser editados:<br>\n    <ul>\n      <li>Nombre</li>\n      <li>Apellido</li>\n      <li>Estado de salud: (Vivo y bien / Herido / Fallecido / Desconocido) </li>\n      <li>GÃ©nero: (Hombre / Mujer / Desconocido) </li>\n      <li>AGrupo de edad: (0-17 / 18 + / Desconocido) <i>(o ingresar una edad estimada en el siguiente campo en su lugar)</i></li>\n      <li>Edad estimada, en aÃ±os </li>\n      <li>Estado de la informaciÃ³n de ubicaciÃ³n: (Desconocida o Conocida) </li>\n      <li>Ãšltima ubicaciÃ³n conocida de la persona <i>(si ubicaciÃ³n actual no es conocida)</i> / UbicaciÃ³n actual <i>(si es conocida)</i></li>\n      <ul>\n         <li>Calle  <i>(tÃ­picamente)</i></li>\n         <li>Ciudad o localidad <i>(tÃ­picamente)</i></li>\n      </ul>\n      <li>Etiqueta de identificaciÃ³n generada automÃ¡ticamente. <i>Trabajadores humanitarios pueden substituir esta etiqueta por un cÃ³digo de triage de su organizaciÃ³n.</i></li>\n      <li>Notas [TO DO: Voice Note]</li>\n	  <li>Notas [TO DO: Text Note]</li>\n    </ul>\n    <p>AdemÃ¡s, la siguiente informaciÃ³n se genera cuando sea crea el registro:</p>\n    <ul>\n      <li>LocalizaciÃ³n geogrÃ¡fica GPS</li>\n      <li>Fecha y hora</li>\n    </ul>\n    Luego, la imagen y la informaciÃ³n correspondiente pueden ser enviadas automÃ¡ticamente por correo electrÃ³nico al servidor LPF.\n    La informaciÃ³n es tambiÃ©n incluida en las etiquetas EXIF de la imagen. Los registros (incluyendo fotos) se almacenan localmente\n    en el iPhone en un formato de base de datos SQLite. Esta base de datos puede ser enviada por correo electrÃ³nico a\n    <a href=\"mailto:lpfsupport@mail.nih.gov\">lpfsupport@mail.nih.gov</a>,\n    donde el personal de soporte puede hacer arreglos para que se incluya en nuestra base de datos. Por lo tanto, datos pueden ser recopilados\n    cuando la conectividad de telÃ©fonos celulares no estÃ¡ disponible, y posteriormente enviados cuando la conectividad estÃ© de nuevo disponible.\n	<br>\n</div>\n<br>\n    <a id=\"email_es\"><h4>Creando un reporte rÃ¡pidamente mediante email, incluyendo nombre, estado y foto</h4></a>\n    <p>Usted puede tambiÃ©n reportar directamente el nombre y estado de una persona mediante correo electrÃ³nico (por ejemplo desde su telÃ©fono celular).\n    Se puede tambiÃ©n adjuntar una fotografÃ­a (solo una foto es permitida por el momento). Los formatos digitales aceptados son .jpg (o .jpeg),\n    .png, y .gif. Por ahora, el contenido del cuerpo del mensaje es ignorado.\n	<br>\n    EnvÃ­e su correo electrÃ³nico a: <a href=\"mailto:disaster@nih.gov\">disaster@nih.gov</a></p>\n	<p>En la lÃ­nea de asunto (subject) de su mensaje electrÃ³nico ingrese el nombre de la persona encontrada o buscada, y una palabra que indique el <b>\"estado\"</b>\n	o condiciÃ³n de esta persona [, TO DO where <b>estado</b>, whose case doesn\'t matter, is]<br>\n    [TO DO: Spanish status strings are planned]<br>\n    </p><ul>\n      <li>Se busca</li>\n      <li>Vivo y bien</li>\n      <li>Herido/herida</li>\n      <li>Fallecido</li>\n	  <li>Encontrado/encontrada <i>([TO DO: but it\'s better to use a status that indicates health too)</i></li>\n	</ul>\n\n	Por ejemplo:<br>\n	Asunto: Juan Perez se busca<br>\n	[TO DO:  Punctuation will be treated as spaces.]<br>\n<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:animatedcollapse.toggle(\'more_email_es\')\">[TO DO:]Show/Hide More...</a>\n<br>\n<br>\n<div id=\"more_email_es\" display=\"none;\">\n    <p><b>Tabla de palabras de \"estado\" o condiciÃ³n de la persona</b></p>\n	[TO DO:  Spanish status strings are planned.  Add English, French rows here too.  Also add spanish to English, French sections]\n <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n  <tbody><tr>\n   <td valign=\"top\" width=\"163\"><p><b>Estados usados por el sistema</b></p></td>\n   <td valign=\"top\" width=\"811\"><p><b>TÃ©rminos sugeridos para ser usados en \"estado\" ([TO DO: case doesn\'t matter])</b></p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Se busca</p></td>\n   <td valign=\"top\" width=\"811\"><p>Se busca, perdida, perdido, buscando, por encontrar</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Vivo y bien</p></td>\n   <td valign=\"top\" width=\"811\"><p>Vivo, bien, okey, saludable, recuperado</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Herido/herida</p></td>\n   <td valign=\"top\" width=\"811\"><p> Herido, herida, lastimado, lastimada, enfermo, enferma, en tratamiento, recuperÃ¡ndose</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Fallecido</p></td>\n   <td valign=\"top\" width=\"811\"><p>Fallecido, fallecida, muerto, muerta, muriÃ³, sepultado, sepultada</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Encontrado/encontrada</p></td>\n   <td valign=\"top\" width=\"811\"><p>Encontrado, encontrada</p></td>\n  </tr>\n </tbody>\n</table>\n    Cuando se ingresa el estado de la persona:<br>\n    <ul>\n      <li> Evite usar la palabra \"no\"</li>\n      <li>Evite usar la palabra \"encontrado\" o \"encontrada\" sola. Indique el estado de salud en una de las tres categorÃ­as: vivo y bien, herido, fallecido</li>\n    </ul>\n</div>\n    <br>\n<hr>\n<br>\n<a id=\"reporting_fr\"><br><h1>Signalement dâ€™une Personne Disparu ou RetrouvÃ©<br></h1></a>\n<ul>\n  <li><b>Par Navigateur.</b> Utilisez le lien \"Report a Person\" Ã  gauche.  C\'est la faÃ§on de mettre Ã  jour un rapport, aussi.</li>\n  <li><b>Par iPhone, iPod Touch, ou iPad.</b> Obtenez notre application gratuite, <a href=\"http://lpf.nlm.nih.gov/\" title=\"\">â€œReUniteâ€�</a>, disponible via Apple Store (<a href=\"#reunite_fr\">dÃ©tails...</a>).</li>\n  <li><b>Par Courriel.</b> Mettez le nom et le statut dans la ligne sujet (\"Jane Doe disparu\" par exemple), joindre une photo, et courriel Ã  <a href=\"mailto:disaster@mail.nih.gov\">disaster@mail.nih.gov</a> (<a href=\"#email_fr\">dÃ©tails...</a>)</li>\n  <li><b>Par des Logiciels SpÃ©cialisÃ©s pour les HÃ´pitaux.</b> Demandez NLM sur notre \"TriagePic\" logiciel Windows pour les stations de triage.</li>\n</ul>\n<br>\n<h1>DÃ©tails</h1>\n\n<a id=\"reunite_fr\"><br><h4>Signalement avec lâ€™application iPhoneâ„¢, â€œReUniteâ€�</h4></a>\n\nEn soutien aux acteurs de lâ€™aide internationale, nous proposons une application iPhone gratuite,\n(<a href=\"http://lpf.nlm.nih.gov/\" title=\"\">â€œReUniteâ€�</a>), disponible via Apple Store.&nbsp;\nCette application crÃ©e un courriel structurÃ© avec photographie jointe (limitÃ© Ã  une photographie par soumission).&nbsp;\nDâ€™autres informations peuvent nous Ãªtre transmises de cette maniÃ¨re, de prÃ©fÃ©rence Ã  lâ€™utilisation dâ€™un courriel classique, non structurÃ©.<br>\n<br>\nâ€œReUniteâ€� prend actuellement en charge lâ€™iPhone 3G et 4 de lâ€™iPhone avec iPhone OS 3.0 ou une version ultÃ©rieure.&nbsp;\niPod Touch et iPad sont Ã©galement utilisables.<br>\n<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:animatedcollapse.toggle(\'more_reunite_fr\')\">Afficher/Masquer Plus d\'Info...</a>\n<br>\n<br>\n<div id=\"more_reunite_fr\" display=\"none;\">\nLes utilisateurs peuvent prendre une photo Ã  lâ€™aide de leur iPhone, ou sÃ©lectionner une photo dans leur galerie.&nbsp;\nIls peuvent ensuite joindre certaines informations sur la personne photographiÃ©e.&nbsp;\nLes champs suivants (tous optionnels) peuvent Ãªtre remplis:<br>\n<ul>\n    <li>PrÃ©nom</li>\n    <li>Nom de Famille</li>\n    <li>Ã‰tat de santÃ©: (En vie / BlessÃ© /DÃ©cÃ©dÃ© /Inconnu)</li>\n    <li>Sexe: (Masculin / FÃ©minin / Inconnu)</li>\n    <li>Ã‚ge: (0-17 / 18+ / Inconnu) <i>(ou une estimation de lâ€™Ã¢ge)</i></li>\n    <li>Ã‚ge prÃ©sumÃ©, en annÃ©es</li>\n    <li>Ã‰tat de position: (Disparu / Connu)</li>\n    <li>DerniÃ¨re position connue <i>(si disparu)</i> / Position actuelle <i>(sinon)</i></li>\n</ul>\n    <p>Rue <i>(par exemple)</i></p>\n    <p>Ville <i>(par exemple)</i></p>\n<ul>\n    <li>Badge dâ€™identification <i>GÃ©nÃ©rÃ© automatiquement par dÃ©faut. Le personnel humanitaire pourra y substituer un numÃ©ro de triage spÃ©cifique aux organismes.</i></li>\n    <li>Autres remarques et commentaires</li>\n</ul>\nDe plus, les informations suivantes sont automatiquement gÃ©nÃ©rÃ©es lors de la crÃ©ation du signalement:<br>\n<ul>\n    <li>Position GPS</li>\n    <li>Date et heure</li>\n</ul>\nLâ€™image et les informations associÃ©es peuvent ensuite Ãªtre automatiquement envoyÃ©es par courrier Ã©lectronique au serveur LPF.&nbsp;\nLes informations sont Ã©galement ajoutÃ©es au contenu des tags EXIF de lâ€™image.&nbsp;\nLâ€™ensemble du signalement (y compris lâ€™image) est enregistrÃ© localement sur lâ€™iPhone dans une base de donnÃ©es au format SQLite.&nbsp;\nCette base de donnÃ©es peut Ãªtre envoyÃ©e par courrier Ã©lectronique Ã  <a href=\"mailto:lpfsupport@mail.nih.gov\">lpfsupport@mail.nih.gov</a>,\nafin que notre personnel procÃ¨de Ã  la mise Ã  jour de notre base de donnÃ©es globale.&nbsp;\nAinsi, les donnÃ©es peuvent Ãªtre collectÃ©es dans des zones sans connexion rÃ©seau puis transmises ultÃ©rieurement,\ndÃ¨s quâ€™une connexion rÃ©seau est disponible.<br>\n</div>\n<br>\n\n<a id=\"email_fr\"><br><h4>Signalement rapide par Courriel - envoi de Nom, Statut et Photographie</h4></a>\n\nLe nom et le statut dâ€™une personne peut nous Ãªtre envoyÃ©\ndirectement par courrier Ã©lectronique (par exemple, envoyÃ© depuis un\ntÃ©lÃ©phone portable).&nbsp; Il vous est Ã©galement possible de joindre une photographie Ã  votre\nmessage (fonctionnalitÃ© limitÃ©e Ã  une seule photographie par message\npour lâ€™instant).&nbsp; Les formats acceptÃ©s sont .jpg (ou .jpeg), .png, et .gif .&nbsp; Pour lâ€™instant, toute information contenue dans le corps du message\nÃ©lectronique est ignorÃ©e.<br>\n<br>\n<p>Courriel Ã  : <a href=\"mailto:disaster@mail.nih.gov\">disaster@mail.nih.gov</a></p>\n<p>Sujet: <i>Nom de la victime</i> <b>Statut</b></p>\n<p><span style=\"font-weight: bold;\">Statut</span> =</p>\n<ul>\n  <li>Disparu</li>\n  <li>En Vie</li>\n  <li>BlessÃ©</li>\n  <li>DÃ©cÃ©dÃ©</li>\n  <li>[RetrouvÃ©] <i>Mais il est prÃ©fÃ©rable d\'utiliser un status qui prÃ©cise la santÃ©, aussi.</i></li>\n</ul>\n<br>\nExemple de sujet dâ€™un courriel: â€œJean-Baptiste Dupont En Vieâ€�<br>\nPonctuation seront traitÃ©s comme des espaces.<br>\n<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:animatedcollapse.toggle(\'more_email_fr\')\">Afficher/Masquer Plus d\'Info...</a>\n<br>\n<div id=\"more_email_fr\" display=\"none;\">\n<br>\n<p><b>Tableau des mots dÃ©crivant le statut</b></p>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n  <tbody><tr>\n   <td valign=\"top\" width=\"163\"><p><b>Statut PrÃ©sumÃ©</b></p></td>\n   <td valign=\"top\" width=\"811\">\n    <p><b>Mots RecommandÃ©s Ã  indiquer dans le sujet du courriel (pas de distinction entre majuscules et minuscules)</b></p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>Disparu</p></td>\n   <td valign=\"top\" width=\"811\"><p>disparu, perdu, trouver, a la recherche de, trouver [SUITE: Ã  la recherche de]</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"></td>\n   <td valign=\"top\" width=\"811\"><p>Anglais: missing, lost, looking for, [to] find</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"> <p>En vie</p></td>\n   <td valign=\"top\" width=\"811\"> <p>en vie, vivant, ok, bien portant, en bonne sante, gueri [SUITE: en bonne santÃ©, guÃ©ri]</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"></td>\n   <td valign=\"top\" width=\"811\"><p>Anglais: alive, well, okay, OK, good, healthy, recovered, fine</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"> <p>BlessÃ©</p></td>\n   <td valign=\"top\" width=\"811\"><p>blesse, mal en point, malade, soigne, convalscent [SUITE: blessÃ©, soignÃ©]</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"></td>\n   <td valign=\"top\" width=\"811\"><p>Anglais: injured, hurt, wounded, sick, treated, recovering</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"><p>DÃ©cÃ©dÃ©</p></td>\n   <td valign=\"top\" width=\"811\"><p>decede, mort, inhume [SUITE: dÃ©cÃ©dÃ©, inhumÃ© ]</p></td>\n  </tr>\n  <tr>\n   <td valign=\"top\" width=\"163\"></td>\n   <td valign=\"top\" width=\"811\"><p>Anglais: deceased, dead, died, buried</p></td>\n  </tr>\n </tbody>\n</table>\nLorsque vous renseignez le statut:<br>\n<ul>\n   <li>Ã‰vitez les tournures nÃ©gatives â€œpasâ€�, â€œnonâ€�</li>\n   <li>Evitez dâ€™utiliser le mot â€œtrouvÃ©â€� sans information complÃ©mentaire sur lâ€™Ã©tat de santÃ© de la victime.</li>\n</ul>\n</div>\n<br>\n\n</div>\n\n\n\n\n",
		"rez_timestamp" => new MongoDate(strtotime("2012-02-29 23:42:37")),
		"rez_visibility" => "Public" );

$collection->insert($document);
//checked
/*
 *PRIMARY KEY  (`rez_page_id`)
*/
//--------------------------------sessions----------------------------------------------
$collection=$db->sessions;//select a collection
$document = array(
		"session_id" => "8qvab4oqd63f0scbnfbu85lv40",
		"sess_key" => "edc61a5cb10cd32f203bebca1697155f",
		"secret" => "efb58af35fd16b00f385294ab209f4d0",
		"inactive_expiry" => new MongoInt64(1363080278) ,
		"expiry" => new MongoInt64(1363080275),
		"data" => "Null" //text data type
);
$collection->insert($document);
$document = array(
		"session_id" => "uonpbf2ununkn5bgc7naf0tp43",
		"sess_key" => "b10ae5c477b3cda8d9d15e1ebdb0a4ca",
		"secret" => "04090641073e21f96478d8e064243cfa",
		"inactive_expiry" => new MongoInt64(1363174798),
		"expiry" => new MongoInt64(1363174794),
		"data" => "Null" //text data type
);
$collection->insert($document);
//checked
/*
 *PRIMARY KEY  (`session_id`)
*/
//--------------------------------sys_group_to_module----------------------------------------------
$collection=$db->sys_group_to_module;//select a collection


$document = array(
		"group_id" => 1,
		"module" => "admin",
		"status" => "enabled"
);
$collection->insert($document);


$document = array(
		"group_id" => 1,
		"module" => "arrive",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "eap",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "em",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "ha",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "home",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "inw",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "mpres",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "pfif",
		"status" => "enabled"
);
$collection->insert($document);


$document = array(
		"group_id" => 1,
		"module" => "plus",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "pop",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "pref",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "report",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "rez",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "stat",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 1,
		"module" => "xst",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 2,
		"module" => "eap",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 2,
		"module" => "home",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 2,
		"module" => "inw",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 2,
		"module" => "pref",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 2,
		"module" => "report",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 2,
		"module" => "rez",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 2,
		"module" => "xst",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 3,
		"module" => "eap",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 3,
		"module" => "home",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 3,
		"module" => "inw",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 3,
		"module" => "report",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 3,
		"module" => "rez",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 3,
		"module" => "xst",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 5,
		"module" => "eap",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 5,
		"module" => "home",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 5,
		"module" => "inw",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 5,
		"module" => "pref",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 5,
		"module" => "report",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 5,
		"module" => "rez",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 5,
		"module" => "stat",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 5,
		"module" => "tp",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 5,
		"module" => "xst",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "eap",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "em",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "ha",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "home",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "inw",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "pref",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "report",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "rez",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "stat",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "tp",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 6,
		"module" => "xst",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 7,
		"module" => "eap",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 7,
		"module" => "home",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 7,
		"module" => "inw",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 7,
		"module" => "pref",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 7,
		"module" => "report",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 7,
		"module" => "rez",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 7,
		"module" => "stat",
		"status" => "enabled"
);
$collection->insert($document);

$document = array(
		"group_id" => 7,
		"module" => "xst",
		"status" => "enabled"
);
$collection->insert($document);


//checked
/*
 *PRIMARY KEY  (`group_id`,`module`)
*/
//--------------------------------sys_user_group----------------------------------------------

$collection=$db->sys_user_group;//select a collection

$document = array(
		"group_id" => 1,
		"group_name" => "Administrator"
);

$collection->insert($document);

$document = array(
		"group_id" => 2,
		"group_name" => "Registered User"
);

$collection->insert($document);

$document = array(
		"group_id" => 3,
		"group_name" => "Anonymous User"
);

$collection->insert($document);

$document = array(
		"group_id" => 4,
		"group_name" => "Hospital Staff"
);

$collection->insert($document);

$document = array(
		"group_id" => 5,
		"group_name" => "Hospital Staff Admin"
);

$collection->insert($document);

$document = array(
		"group_id" => 6,
		"group_name" => "Researchers"
);

$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`group_id`)
*/
//--------------------------------sys_user_to_group----------------------------------------------
$collection=$db->sys_user_to_group;//select a collection
$document = array(
		"group_id" => 3,
		"p_uuid" => "3"
);

$collection->insert($document);

$document = array(
		"group_id" => 1,
		"p_uuid" => "1"
);

$collection->insert($document);

$document = array(
		"group_id" => 3,
		"p_uuid" => "2"
);

$collection->insert($document);//checked
/*
 *KEY `p_uuid` (`p_uuid`),
  KEY `group_id` (`group_id`),
  CONSTRAINT `sys_user_to_group_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `sys_user_to_group_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `sys_user_groups` (`group_id`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------users----------------------------------------------

$collection=$db->users;//select a collection

$document = array(
		"user_id" => 1,
		"p_uuid" => "1",
		"user_name" => "root",
		"password" => "c77ce1c91f65ec039c255b7b4981a452",
		"salt" => "e5cb9f3624f2d81964",
		"changed_timestamp" =>  new MongoInt64(1334258322),//bigint data type
		"status" => "active",
		"confirmation" => "NULL",
		"oauth_id" => "NULL",
		"profile_link" => "NULL",
		"profile_picture" => "NULL",
		"locale" => "NULL",
		"verified_email" => NULL //tinyint data type"
);

$collection->insert($document);

$document = array(
		"user_id" => 2,
		"p_uuid" => "2",
		"user_name" => "mpres",
		"password" => "NULL",
		"salt" => "NULL",
		"changed_timestamp" => new MongoInt64(0),//bigint data type
		"status" => "NULL",
		"confirmation" => "NULL",
		"oauth_id" => "NULL",
		"profile_link" => "NULL",
		"profile_picture" => "NULL",
		"locale" => "NULL",
		"verified_email" => NULL//tinyint data type"
);

$collection->insert($document);

$document = array(
		"user_id" => 3,
		"p_uuid" => "3",
		"user_name" => "anonymous",
		"password" => "NULL",
		"salt" => "NULL",
		"changed_timestamp" => new MongoInt64(0),//bigint data type
		"status" => "active",
		"confirmation" => "NULL",
		"oauth_id" => "NULL",
		"profile_link" => "NULL",
		"profile_picture" => "NULL",
		"locale" => "NULL",
		"verified_email" => NULL//tinyint data type"
);
$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`user_id`),
  UNIQUE KEY `user_name` (`user_name`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `users_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------user_preference----------------------------------------------
$collection=$db->user_preference;//select a collection
$document = array(
		"pref_id" => 0,
		"p_uuid" => "",
		"module_id" => "",
		"pref_key" => "",
		"value" => ""
);

$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`pref_id`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `user_preference_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------voice_note----------------------------------------------
$collection=$db->voice_note;//select a collection
$document = array(
		"voice_note_id" => new MongoInt64(0),//bigint data type
		"p_uuid" => "",
		"length" => 0,
		"format" => "",
		"salt" => "",
		"sample_rate" => 0,
		"status" => "",
		"channels" => 0,
		"speaker" => "",//enum
		"profile_link" => "",
		"url_original" => "",
		"url_resampled_mp3" => "",
		"url_resampled_ogg" => ""
);

$collection->insert($document);//checked
/*
 *PRIMARY KEY  (`voice_note_id`),
  KEY `p_uuid` (`p_uuid`),
  CONSTRAINT `voice_note_ibfk_1` FOREIGN KEY (`p_uuid`) REFERENCES `person_uuid` (`p_uuid`) ON DELETE CASCADE ON UPDATE CASCADE
*/
//--------------------------------voice_note_seq----------------------------------------------

$collection=$db->voice_note_seq;//select a collection 
$document = array(
		"id" => new MongoInt64(1)//bigint data type
);
$collection->insert($document);

/*
 *PRIMARY KEY  (`id`)
*/

?>